Any open source options backtesting software (minimal features will do)

Discussion in 'Programming' started by rvsw, Nov 27, 2018.

  1. rvsw

    rvsw

    Are there any open source options back testing software available for the US market?
    I could find https://github.com/michaelchu/optopsy but it seems to be pretty buggy at this stage. I was looking for something which will give me a platform to develop more complex strategies and perhaps I can contribute back to the open source.

    Thanks for any inputs
     
  2. Baron

    Baron ET Founder

    It's not open source but the options backtester called Trade Machine Pro from Capital Market Labs is pretty awesome, and it's only $89 per month.

    You should check out the past posts from @CML_Ophir here on ET. He demonstrates how the product works by posting actual trade strategies generated by it.
     
    rvsw likes this.
  3. rvsw

    rvsw

    Thank you for hte input. I will check the posts.
     
  4. Felix168

    Felix168

    Hi RVSW,

    I am the maintainer of TuringTrader, which is an open-source backtester for equities and options written in C#. I am successfully using it for simulating equity portfolios, and option trades on daily bars. Here is a quick list of features:
    • simple Windows Desktop UI for interactive sessions
    • import data in various CSV formats and with configurable column-mapping
    • automatic download/ update of data files from IQFeed, Yahoo, and Stooq
    • query account summary and positions from Interactive Brokers
    • calculate indicators, with a growing library of standard indicators
    • simulate stock trades, and portfolios of stocks. Currently market and stop orders are supported
    • simulate option trades. Currently this is limited to cash-settled European-style options
    • create fully customized Excel reports with just a few lines of VBA
    • create fully customized R reports, either in straight R, or with RMarkdown
    • strong focus on easy-to-use time-series APIs, to make coding a breeze
    • multi-threaded optimizer engine, able to utilize all CPU cores
    • demo algorithms to shorten learning curve
    • API documentation, and quick start guide, as Windows help file
    • Unit tests
    The repository is hosted here: https://bitbucket.org/fbertram/fub_tradingsimulator

    Hope this helps,
    Cheers

    Felix
     
    rvsw and Baron like this.
  5. Make your own. I have quite a bit of detail on my GitHub and some samples based on Vix Options.

    Ultimately I believe this is your best way to go. Create your own thing in python. https://gist.github.com/AnthonyFJGarner

    You will find details in Jupyter Notebook form, of how to read in CBOE data to a program and then a number of actual trading programs for strangles and credit spreads.

    You will also find a notebook to allow you to create fake options data based on Black Scholes Pricing
     
    rvsw likes this.
  6. rvsw

    rvsw

    Thanks to both of you. I will investigate each of them
     
    Felix168 likes this.
  7. Mine is very much single purpose. But it certainly does the job. These days I prefer to work in Jupyter Notebook and have single purpose systems right in front of my eyes with DataFrames that I can print out and analyse with Excel. As you are probably aware the big, big problem with options is how to make sense of the mass of different strikes and expiries each day. I have taken the route of having one notebook dedicated to "rolling" my own concatenated option series but you need to review the out put of each to check there are not too many missing dates etc. I provide the mechanism to save csv files from the notebook for this purpose.

    And you need to be familiar with Python and the process of adding libraries.

    The advantages of this route are that you learn a great deal about your individual systems and you have complete freedom to create exactly what you please. You are not restricted by any particular back testing engine. For many years I used Trading Blox but am extremely glad I struck out for freedome and can now create whatever I want with open source libraries.