Giter Club home page Giter Club logo

optionm's Introduction

optionm

This repository conducts buy- and sell- side analysis of call and put options on top 100 US firms by market cap. For a thorough introduction see the Wiki tab.

Warning:

  • This is an exploratory study with no profitable strategy in sight.
  • Provision of codes is not an investment advice.
  • All codes and analyses are subject to error.

Replication:

– In a terminal window install the requirements as:

pip install -r requirements.txt

– In Python environment import the OptionM module as:

from optionm_module import OptionM as om

You will be asked to enter your credentials for accessing WRDS at this stage.

– Specify the module using study_period and horizon as:

a=om(tudy_period=range(2001,now.year-1),horizon=91,progress=100)

Choices for horizon are [10, 30, 60, 91, 122, 152, 182, 273, 365, 547,730]

– Obtain the necessary OptionMetrics record matched with CRSP through:

a.step1_crsp()

– Process the data to generate different proxies of volatitlity matched with each record as:

a.step2_proc()

– Analyse the data for a buy-side analysis for top market_cap_count firms by market capitalisation as:

[result_tbl = ] a.analyse_buy(market_cap_count=100)

– Analyse the data for a sell-side analysis for top market_cap_count firms by market capitalisation as:

[result_tbl = ] a.analyse_sell(market_cap_count=100)

result_tbl is a record of all findings in buy/sell side analysis as a DataFrame.

It is suggested that you replicate this process for different maturity periods (e.g. 30, 60, 91, 182, 365) to see the figures as in Wiki tab.

Dataset:

– The main chunk of data on option contract including details on premiums, implied volatility, and prices are from OptionMetrics.

– Market capitalisation information is obtained from CRSP. Only common stocks (Share Codes 10 and 11) listed in Exchange Codes 1 to 3 (NYSE and NASDAQ) are considered.

– Matching OptionMetric data with CRSP is done through 8-character CUSIP code from CUSIP Global Services.

All datasets are accessed through WRDS

Access requirement:

To access and replicate the results you need an active subscription with WRDS. Specifically, you need active subscriptions to OptionMetrics, CUSIP, and CRSP libraries on WRDS.

Packages

The following packages in Python to run these scripts:

  • WRDS
  • Numpy
  • Pandas
  • statsmodels
  • matplotlib

optionm's People

Contributors

hkalager avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.