Fully Automated Stocks Trading

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

Thread Status:
Not open for further replies.
  1. mhparker

    mhparker

    AKA Real Covid Laboratory.
     
    #241     Oct 24, 2020
    guru and ValeryN like this.
  2. guru

    guru

    I was just excited that my strategy shorted the same stock that you did, which I think may validate both approaches. The timing and other details will always be different.
    It's generally useful to observe how your strategies work together and offset each other while still being profitable, despite those outliers.
     
    #242     Oct 25, 2020
  3. ValeryN

    ValeryN

    Understood!

    It very interesting to see other traders' entries on the same instruments. As over-time it easy to stop seeing outside of the things we are used to see.

    Re my own strategies portfolio:

    With my longs, I had 2 strategies from late last year - Q1 2020 that bumped into each other a bit. Ended up merging them into 1. Slightly worse combined performance but reduced complexity quite a bit. Though, I am still thinking about splitting them sometimes

    Otherwise all current 5 strategies have nearly 0 chance of bumping into each other. They are specifically designed to target very different situations or different universes.

    This is performance of the "2 long strategies" in Q1 before I merged them. Blue one was taking high probability high expectancy trades from the green and doing a bit of special handling which worked incredibly well as market was dropping.

    upload_2020-10-25_11-9-3.png

    Val
     
    #243     Oct 25, 2020
  4. ValeryN

    ValeryN

    For those who are interested - RealTest now has its' own forum and there are already handful useful post / discussions.

    Marsten also posted a RealTest script for Bensdorp's strategies there. He normally runs backtest without compounding which is the case here.

    e20e358ac33da057427660742651a816aafbd463.png
    Val
     
    #244     Oct 25, 2020
    .sigma likes this.
  5. mhparker

    mhparker

    Thanks for the forum mention @ValeryN. At this time I am limiting participation to active beta-testers of the software. After release it will be limited to registered users. Please visit https://mhptrading.com/realtest, download and run the installer, accept the license, then email me at the address provided therein if you wish to participate. Thanks!
     
    #245     Oct 25, 2020
    .sigma likes this.
  6. mhparker

    mhparker

    Actually the above backtest was run with a compounded position size formula. If you run it with static size, since it's a 5-year test returning ~10%, the net profit is only about $50K.
     
    #246     Oct 25, 2020
  7. ktl8412

    ktl8412

    Val, in general do you prefer strategies with a higher trade frequency?

    For example, let’s say Strategy A and B are both mean reversion long strategies which use the same basic setup conditions. When these conditions are met, Strategy A will place a limit order (for next day) that is 4% below the last closing price while for Strategy B it is 6%. For exit, let’s assume we use a time stop of 3 days for both strategies.

    Now obviously there will be more trades in Strategy A than B in a year, but B will probably have a bigger average gain. Assuming both strategies have similar reward/risk profile (let’s say the MAR ratio is about the same), would you prefer to trade Strategy A or B?
     
    #247     Nov 2, 2020
  8. ValeryN

    ValeryN

    In general - yes.

    To put it simply - the more trades in the sample and the larger the duration you tested over - the better the odds of it working in the future. If you try to achieve both of those while developing a strategy - it will be actually quite difficult to overfit. Also, you want to keep reasonable number of rules / degrees of freedom regardless of what backtest tells you will be working better.

    The final choice will come down to your ability to execute and quality of testing assumptions.

    You will also need to take into account those:
    1. Estimated slippage - you might think LMT order offers 0 slippage but it is not always the case. So when you're testing you want to include some slippage per trade even if you don't expect any. There are many little things that can cause it and you won't find out before you have 100s live executions in sample
    2. Commission and other cost (borrowing for shorts for instance or interest rates if leveraged)
    3. Account usage. Let's say - if higher trade count system gives you same Return/DD but uses 3x capital, this is probably too much of a compromise for higher trade count
    4. Margin test. You don't want a strategy to come anywhere near to your margin call level. As stocks don't always have 50% margin. I see a range anywhere from 25% to 500%
    5. Stress test results. One problem with higher trade count is - what's gonna happen if there is very high correlation event. Like 1987, or some days during .COM bubble, or 2011 "flash" crash. What you are looking for is to (a) test peak account usage (b) assume the worst and see what happens if more orders got filled than you expected (c) look at randomized entries order tests and see if you're comfortable with outcomes distribution
    6. Your ability to efficiently use the remainder of your account. If you got no other strategies, then you might be more liberal with average account use increase due to higher trades count. If you have others (ideally), your will need to include them into consideration
    7. Is higher count taking away opportunities from your other strategies? That's gonna least of your problems at the beginning but you will eventually bump into it. By that time, you will know what to do about it :)
    To your particular example - I actually started with similar rules like you described. I went with a higher expectancy system where entry will be at more extreme conditions = less trades. Problem was - the more extreme are conditions, the harder it will be to get a good fill or any fill, with some exceptions on super high volume stocks. Psychologically, I also found easier to trade with higher frequency. Enables way faster learning, from my perspective.

    Ever since I have been increasing trade count and this year alone is ~1500 trades so far.

    Val
     
    Last edited: Nov 2, 2020
    #248     Nov 2, 2020
    solidme, fan27, .sigma and 2 others like this.
  9. ktl8412

    ktl8412

    Good sharing and your list of factors to consider is excellent. Reading your posts is a sure way to shorten my learning curve!

    Since higher trade count is the way to go, does it go without saying that a stock universe with more candidates is generally preferred (Russell 3000 better than SP500, which in turn is better than Nasdaq 100)?
     
    #249     Nov 3, 2020
  10. themickey

    themickey

    I'll butt in....
    A large stock universe is better than a small one but there is no point imo taking pot shots at whatever rears its head in a large or small universe.
    Some stocks and sectors consistently outperform others which are preferred targets, but then timing comes into it.
    If hot stocks have run hard it can be high risk entering late in a wave.
    Quality stocks outperform speculative stocks in the long term, but speculative stocks most often outperform quality stock in the short term on a case by case basis, ie speccys which run, will outrun quality runners - in the short term.
    Generally, consistently higher volatile stocks underperform in the long term.
    But back to universe size, yes, more choice the better so long as you trade systematically, ie have a specific narrow defined method for stocks to buy.
     
    Last edited: Nov 3, 2020
    #250     Nov 3, 2020
    ktl8412 and ValeryN like this.
Thread Status:
Not open for further replies.