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

Discussion in 'App Development' 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
     
    fullautotrading likes this.
  2. rvsw

    rvsw

    Thank you for hte input. I will check the posts.
     
  3. 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.
  4. 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.
  5. rvsw

    rvsw

    Thanks to both of you. I will investigate each of them
     
    Felix168 likes this.
  6. 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.
     
    rtw likes this.
  7. @rvsw, did you find any suitable project?
     
  8. I've built https://github.com/rburkholder/trade-frame. It can do options. Fundamentally, one needs to know some C++ to use it though.
     
  9. Matt_ORATS

    Matt_ORATS Sponsor

    ORATS has been backtesting options for clients for over 10 years.


    You can backtest any option strategy dating back to 2007.

    Backtest bullish, bearish, and neutral strategies - ranging from covered calls to diagonal calendar spreads.

    Customize days to expiration, strike selection, and many other parameters including stop losses and profit targets.

    Choose from hundreds of entry and exit triggers and technical indicators such as contango and RSI.

    View results in minutes and get important metrics such as Sharpe ratio, volatility of returns, win/loss%, max yearly loss, max drawdown, and more.
     
    Baron likes this.