After 3 months of hard development I hereby proudly present

ichinscratchy v0.2.0

It is an Ichimoku-based trading system originally developed in libreoffice/ openoffice basic macro language and rewritten in C from scratch.The initial release with a feature list can be found following this link. To immediately jump to the shiny new page, use: The Ichinscratchy trading system (or continue reading to find out about the new features).

changes in v0.2.0 compared to v0.1.0

New features:

  • implemented portfolio management using spearman correlation
  • new config option PORTFOLIO_ALLOCATION which selects the portfolio allocation model, currently equal (all position sizes are equal) and spearman (position size of new trade is determined by spearman correlation with existing portfolio entries)
  • added config option PORTFOLIO_SPEARMAN_PERIOD which determines the period used for calculating Spearmans Rho
  • added a bunch of config options PORTFOLIO_CORR_... and PORTFOLIO_PN_... to tailor position sizing based on correlation
  • database changes: portfolio now has the column pos_size; orderbook_daily column size was renamed to quantity and additional column pos_size was added ==> THIS BREAKS DATABASE COMPATIBILTY WITH versions < v0.2.0!!
  • added command line option -p/--portfolio to skip signal evaluation/execution and print out current portfolio to database
  • added average (mean) and median holding days to orderbook analysis/ reporting function (use --report or -r command line option)
  • and in /tools now parse the config file under /config, no more hardcoded db credentials in scripts
  • release version now comes with example DAX30 data file for users to start experimenting with
  • migrated source code documentation to doxygen-compatible style --> full reference in html/pdf now available under /docs


  • if run twice without updating the quotes (with a couple of days to execute), the program would sell positions based on the last SL in database. If days to execute date back long enough, it selled even positions which were bought later
  • when running backwards, the trend filter ICHI_CHIKOU_CONFIRM did not work properly
  • if portfolio contained more than 1 position with same SL, for each day the SL was hit only 1 SL was executed
  • when reporting statistics (-r/--report or config option) and there is no trade in db --> print message instead of crashing :)

(Mostly useless) statistics about the code:

  • 3 months development
  • ~6700 lines of code (compared to 5900 in v0.1.0)
  • ~4000 lines comments (compared to 2400 in v0.1.0)
  • ~ 50 beers consumed during development (to provide hope this will ever come to an end)

If you are interested, I created a new category for it on my blog (see top menu), or follow this link: The Ichinscratchy trading system

Development is hosted over there at gitlab:

Feel free to join and contribute to this project!


{jd_file file==2}

Comments powered by CComment