Stock Market & Finance

  • All
  • Articles
  • Blog Post
  • General Business Automation
  • Portfolio
  • Stock Market & Finance

March 20, 2025

Introduction This final part summarizes trade performance and identifies optimal trade setups. We generate a ranked list of the best opportunities based on historical data. Trade Success Rates by Setup We calculate the average success rate of different trade setups based on entry time, option type, and strike distance. Option Type Moneyness Strike Distance Entry Time % Achieving 5% Profit Call ATM 0 09:31:00 100.0% Call ITM -7...

March 20, 2025

Introduction In this section, we apply logistic regression and clustering techniques to better understand trade profitability. We analyze whether specific attributes—such as time of entry, moneyness, and strike distance—affect the likelihood of hitting a profit target. We also explore Cohen’s d effect size measurement and perform survival analysis to determine trade longevity. Logistic Regression for Profit Prediction To predict the probability of an option reaching its profit target,...

March 20, 2025

Overview Before diving into hypothesis testing, we need to clean, preprocess, and analyze our dataset. This post walks through the process of merging options and underlying asset data, labeling moneyness, and adding technical indicators. Key Steps Key Functions & Outputs This stage provides an intuitive understanding of how options behave relative to the underlying asset, setting the stage for deeper analysis.

March 20, 2025

Overview The first step in any machine learning project is gathering the necessary data. In this post, we outline how we collect and structure our options trading dataset. We focus on intraday price movements of options contracts and underlying assets, ensuring that we have high-quality data to drive our analysis. Data Sources & Collection Process Key Functions & Outputs This foundational step ensures that our data is complete...

March 20, 2025

Introduction to the Blog Series Options trading is a sophisticated financial endeavor that requires a deep understanding of market movements, risk management, and statistical probabilities. In this blog series, we explore how machine learning can be leveraged to analyze options data, identify profitable trading patterns, and optimize trading strategies. Using a structured pipeline, we conduct an exploratory data analysis, apply hypothesis testing, and use statistical modeling to uncover...

February 27, 2025

When working with financial data, efficiency matters. Traders, analysts, and data scientists rely on various storage formats—CSV, Parquet, and SQLite—for backtesting trading strategies. But which format offers the best performance? In this post, I benchmark three widely used storage formats while backtesting Apple Inc. (AAPL) stock data. The goal? To determine which format provides the fastest execution time while ensuring accuracy across different trading strategies. The Experiment I...

December 30, 2024

This is a continuation in a series to show working examples of trading bots using Alpaca. A link to the notebook can be found on GitHub. This trading bot streams websocket data, calculates Bollinger Bands for signals, and then buys/sells accordingly. It also logs the data so you can review what’s going on too. An alternative version of this can be found here where the main difference is...

December 30, 2024

This is a continuation in a series to show working examples of trading bots using Alpaca. A link to the notebook can be found on GitHub. This trading bot streams websocket data, calculates Bollinger Bands for signals, and then buys/sells accordingly. It also logs the data so you can review what’s going on too. An alternative version of this can be found here where the main difference is...

Prev
1234