Adventures in Algorithms

Discussion in 'Journals' started by Raphael, Sep 23, 2015.

  1. Raphael

    Raphael

    I've decided to diversify a little and add corn to the portfolio. Here's the new weighting:

    Code:
    AUD       2015-12  25%
    EDOLLAR   2017-12  12.5%
    TU        2015-12  12.5%
    NK225M    2015-12  25%
    ZC        2015-12  25%
    
    First trade -1 ZC at 378 3/4.
     
    Last edited: Oct 28, 2015
    #21     Oct 28, 2015
  2. If you want to diversify even more, going for ETF's might be an option. You might pay more in (transaction) costs though.
     
    #22     Oct 28, 2015
  3. Raphael

    Raphael

    Yeah. The difficulty is that leverage with ETFs is much more limited and spread is higher. Most ETFs only have a volatility of around 10%, which means I'd have to leverage up at least 2x to hit my volatility target. That would make margin calls a real risk, plus you have to pay interest on the margin loan as well.

    I've thought about deep in the money options as another alternative but the spread is high.

    This is really just a test run at this point. If it works well I'll scale up the account and will be able to diversify much more broadly.
     
    #23     Oct 28, 2015
  4. gkishot

    gkishot

    Use leveraged etfs. No margin risk there.
     
    #24     Oct 28, 2015
  5. Raphael

    Raphael

    Yeah but the daily resets will make holding positions for the long term complex. As I understand it leveraged ETFs are good for day traders, but not so good for interday. I hold for weeks at a time, so I'm not sure they'll work for my case.

    On top of that there's the additional tax to deal with.
     
    Last edited: Oct 28, 2015
    #25     Oct 28, 2015
  6. Raphael

    Raphael

    Today was an interesting day. Thanks Janet :)

    I closed my AUD position for about $184 profit.

    Still continuing to hold ED and TU.

    Account value: $19,801, down 2.3% from high water mark.
     
    #26     Oct 28, 2015
  7. Raphael

    Raphael

    Not much new on this front. No new trades. Portfolio is back up to $19,673. I've automated everything except execution so now I just receive an email once per day with directions on what trades to make.
     
    #27     Nov 15, 2015
  8. Raphael, thanks for sharing this info. I also finished reading the same book that you referenced. Do you mind sharing what software that you are using for trade generations? I am having difficult getting my platform to provide a portfolio level analysis. As to calculating correlations ("IDM" multiplier), I am curious to know as whether you are using undelying instrument correlations or backtested system correlations for each instrument and what look-back period you are using for determining such correlations. Thanks for any information you can share.
     
    #28     Nov 30, 2015
  9. Great thread. If you don't mind me asking, What software (other than Python) did you use to backtest? Also what broker did you get your price data from to run the testing?

    Best of luck! Great to see a thread like this started from the ground up. Finally something useful around here.

    Also, you probably did this already but if not, i'd analyze the correlation for the contracts your trading to make sure they are diversified enough if that's what you want to achieve.
     
    Last edited: Nov 30, 2015
    #29     Nov 30, 2015
  10. Raphael

    Raphael

    Thanks for the interest. I'm using Python for everything, from stitching futures prices through to backtesting, portfolio analysis and trade generation. I pull prices from quandl with a cron job on my mac and have Python email me once a day with any necessary trades using Postmark which provides an API for automatically sending emails.

    For correlations I use the rules of thumb in Rob Carver's book, together with the formula he has in the back for computing the IDM multiplier. This is pretty straightforward to apply using numpy in Python.

    One thing to keep in mind if using Rob's book, the formula for the carry rule in the Appendix is actually backwards. Check here for details: http://qoppac.blogspot.com/2015/11/typo-in-definition-of-carry-rule-for.html
     
    #30     Nov 30, 2015
    Ghost_of_Blotto likes this.