Fully Automated Stocks Trading

Discussion in 'Journals' started by ValeryN, Jun 14, 2020.

Thread Status:
Not open for further replies.
  1. It is for this reason that I prefer instruments which trade (almost) 24 hours per day. Such as futures and forex.
     
    #81     Jul 31, 2020
    _terminus_ likes this.
  2. Thanks for the considered response, and nice plots.

    I think this is the key point: "Stocks gap a lot, especially small/mid caps where most of my trades are. " IMHO that doesn't mean you shouldn't use stops, but it does mean you need to be careful in assuming how effective they are.

    "but also risking hiding that fact in my backtest" . What I'm reading into this is that you assume that you will trade out at a stop level during a gap in your backtest, when of course that's not always possible. Do you have the ability to modify your backtest so that this assumption is challenged? Personally I'd assume I always traded at my limit when I was placing resting orders, but that I'd trade somewhere between my price at the worst point of a bar for stop orders (or if I don't have bar data, at the subsequent closing price; i.e. I lag everything by one time period to get my expected fill price). You know reality is somewhere between these two places, and you can get an idea of how lucky you need to be in those gaps. You can also compare actual trading to backtest to see how often you actually trade out near stop levels.

    "Considering #1 I am never comfortable putting more than 10% on a trade." "My systems generate a lot of trades"

    I think you said earlier that your average holding period was a few days. Putting this together, I feel like 10% might be too large: is 10% the notional value of your exposure (i.e. with $100K you buy a $10K worth of stock) or the amount you expect to lose before the trade is closed? If the former you are probably okay, if the latter I'd be concerned. The missing piece of information (forgive me if it was earlier in the thread) is how many stocks you typically have in your portfolio, and are you using any leverage?

    Looking at your return profile, it looks like your risk might be rather high. The standard deviation of your returns is usually somewhere between 1% and 2% which is probably find, but the tails are extremely fat (consistent with trading small cap stocks as you say, and also consistent with mean reversion). To get a series of 8% - 12% days is worrying: I know early this year was a market crisis, but they do tend to happen every few years and that is a lot of risk to be running. I wonder if you could increase the number of stocks you typically hold, or perhaps even cut the average exposure overall?

    GAT
     
    #82     Jul 31, 2020
  3. ValeryN

    ValeryN

    In general I am looking at strategies with at least 300 trades per year. Sometimes more than a 1000. When trade count is that high an impact of couple of missed trades naturally gets reduced. I'd look at biggest winners occasionally and if they create disproportionate return I will try to exclude them, but the high trades count is what decreases dependency on a single outlier.
     
    #83     Jul 31, 2020
  4. ValeryN

    ValeryN

    This is what I would do if the idea would show a potential. Real question here is why would I spend time on more accurate modeling of those stops if initial "best case scenario" test for them showed consistent degradation of the values I optimize for across most of my test periods?

    This is a very good question. Someone can probably write a book to answer this.

    How would you define value at risk for any stock? I can try to calculate it according to your definition.

    Here are my thoughts.

    The reason I keep mentioning 10% is - I'd size up to 10% as a general rule. For example 2 of my high turnover MR strategies have a cap of 7% currently, all shorts have this cap, so strategies would be as low as 5%. Pedantically speaking this IS value at risk and more for shorts, so is any position any stock trader in the world is holding no matter what they think is at risk, as this is just a nature of stocks. But due to high recovery factor of my strategies with a lots of trades I don't believe it is optimal to size to the absolutely worst case scenario. Nevertheless I do pay a lot of attention to worst cases, study every single biggest DD/crash/volatility spike over last 30-70 years and try to avoid too much of exposure to likely to become highly correlated trades when that happens.
    Depending on the definition of the "instrument" you might say I trade one as stocks will have high correlation with the market especially with high vol. But I diversify by a type of strategy / hold periods / long+short and exit types. So, perhaps, something similar to "instrument diversification multiplier" you mention in your blog can be applied here.

    My average exposure across all strategies was ~75% from Jan to May. Available leverage is 2x (t-reg margin account). Occasionally I'll get close to max but it rarely happens due to too high number of positions. Predominately due special margin requirements, when basically 1 position needs 2-8x amount of capital to hold comparing with normal. I'm contemplating to start skipping those but don't have sufficient stats yet to make this decision. Avg positions at any time is probably around 8-10.

    Attached couple of graphs with long/short exposure per strategy and total portfolio positions

    2020-07-31_07-56-04.png
    2020-07-31_07-57-16.png
     
    #84     Jul 31, 2020
  5. @ValeryN what does the color code mean in the last chart, titled "Exposure by strategy"?
     
    #85     Aug 1, 2020
  6. ValeryN

    ValeryN

    Each strategy has its own color. Negative exposure is short
     
    #86     Aug 4, 2020
  7. ValeryN

    ValeryN

    Performance update: -6.68% in July, over ~120 trades. Lots of trading.

    YTD monthly: +4.91%, +0.59%, +14.03%, +18.86%, +6.27%, +1.23%, +8.54%, -6.68%

    Pretty much all the loss came from one system. No surprise as it is the worst market environment for it. System is somewhat of a trend following short. It made a lot of money when market was crashing early this year, now it will be loosing money if market keep going up. That alone wouldn't make me to change the system but I did find a fairly consistent discrepancy between its' live and backtest results over last month and made a change to address it. Will see how it goes afterward.

    New execution engine I launched in early July is working very well, but more very volatile days will be required to truly test it.

    On vacation since last Friday.
    Trying to just check emails to look out for "health check" alerts from trading automation.

    All running smoothly so far.

    Val
     
    #87     Aug 4, 2020
  8. Somehow these numbers don't add up. January to July is 7 months, but you post 8 results.

    Enjoy your holiday.
     
    #88     Aug 5, 2020
    shh likes this.
  9. The black and green strategies hardly open any position. Still it is beneficial to keep them running?
     
    #89     Aug 5, 2020
  10. ValeryN

    ValeryN

    You're right! December 2019 creeped in. Can't edit those posts so will just drop it in the next one.

    I think of myself as someone paying lots of attention to details but lately I noticed that I actually do frequently make mistakes like that when it comes to things not impacting my bottom line.

    Perhaps it will be better when I get back :)

    Val
     
    #90     Aug 5, 2020
Thread Status:
Not open for further replies.