Skip to content

applying the Cox, Ross, & Rubenstein binomial option pricing model to thousands of stocks

Notifications You must be signed in to change notification settings

forbesjon2/binomialOptions2018

Repository files navigation

binomialOptions2018

Overview

This was a project I worked on for a few months in 2018. The idea was to generate reports like the excel document in the exampleOutput folder please read the readme associated with that excel document. Some things that appear on that document (and the source code for that matter)are named very improperly. The code needs a solid amount of refactoring as it was made when I was new to the CS area.

The purpose of those reports was to analyze options that appeared to be outliers in regard to their binomial model's pricing in hopes of finding highly asymmetric investments. The next step is to use the data that was collected to analyze the effectiveness of various option strategies. We weren't completely sure of whether this was effective or not as we were provided limited data before our data source made a breaking change (mentioned in the implementation section).

Implementation

This project was halted because of a change to barchart's option data API, requiring a subscription of sorts. My future plans are to explore other sources of data such as robinhoods unofficial REST API.

important note: the black scholes equation is only effective for European options because they cannot be excercised before expiration. Pricing American stock options is more effective with the binomial options model.

TD Ameritrade API limit: 120 requests/min

Resources

Option Pricing: A simplified Approach (1979)

Long term usage (Nov 23 2023)

If the app keeps making 'authenticating' messages and isnt making any progress, td_state is likely expired. Delete it and re-run the program

9/23/2023 Updating & migration to schwab

https://developer.tdameritrade.com/content/trader-api-schwab-integration-guide-june-2023-update https://beta-developer.schwab.com/?cmp=em-YAS

TDA still works so I wont migrate it yet

Zacks custom screen must have the following format: Company Name,Ticker,Market Cap (mil),Optionable,Div. Yield %,Next EPS Report Date (yyyymmdd)

This is because what was originally network calls to get certain data was migrated to the information from the zacks screen. Zacks screen example

This can be achieved by adding filters (starting with market cap) in order

Multithreading is limited by the API's rate limit. It used to be 3 but now 1 thread even hits the rate limit at 5% and then periodically.

Eventually this will have to be moved to schwab or some other platform. I think before then ill have to find some sort of value in converting this to the new API

About

applying the Cox, Ross, & Rubenstein binomial option pricing model to thousands of stocks

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages