Coder Social home page Coder Social logo

backtest-options's People

Contributors

tsuz avatar

Stargazers

 avatar

Watchers

 avatar

backtest-options's Issues

Improve backtest performance

Why

The backtest performance can take minutes if the data goes back 18 years. We should complete this within seconds.

Currently, these make the performance slow:

  • Reading the CSV file (this can take a minute or more depending on the size)
  • Making an options chain from than CSV file (this can take longer than the data sometimes)

Run covered call strategy

Why

A command-line should output the results of a strategy, and one obvious strategy is covered calls.

Acceptance Criteria

  • strategy covered-call should run a covered call strategy
  • once the command is run, it should output the results such as returns

Fix import data to use EOD data instead of 1545 data

Why

EOD bid/ask data seems to be more representative than the 1545 data. OHLCV covers traded prices, so this may not be the best representation of simulated trading if one is trying to cross the spread.

Acceptance Criteria

  • Import all columns
  • Use EOD col instead of 1545
  • Use Mid price of EOD bid/ask to get the fair price of options.

Import data and save onto file

Why

Importing data can take a while since data is zipped into many files, so there should be a normalization process to combine into one file. This would save time to read each file when it's looking back many years of daily data.

Acceptance Criteria

  • There should be a data/options/${symbol}.csv folder that can create a combined CSV from imported files.
  • There should be an import command to achieve this

Create hedging strategy

Why

By buying the underlying stock, selling a near-term call, and buying a far away put will give us a premium while covering the tail risk. There is no name for this, so it will be called PIP.

Acceptance Criteria

  • A hedging strategy, PIP, can be specified via command line

Add cumulative returns

Why

One should understand drawdowns and cumulative returns

What

  • Create a cumulative profit column
  • Show drawdowns in results

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.