Fully Automated Stocks Trading

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

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

    fan27

    Cool to see someone else using Slack for notifications. All of my strategies log structured events which get pushed up to AWS CloudWatch and from there I have Lambda's sending messages to various Slack channels. This setup works really well because all my strategies have to do is log events and then I can easily change how I report those events without touching any of my strategy code.

    One thing you might want to consider is having a separate channel for reporting alarms. I have found this very helpful in that sometimes I will mute all channels except the alarm channel where I know that if I get a notification it is because there is a problem.
     
    Last edited: Jul 16, 2020
    #41     Jul 16, 2020
    _terminus_, .sigma and ValeryN like this.
  2. ValeryN

    ValeryN

    Awesome!

    Thank you for sharing. Found your thread with details. It seems like a good and scalable solution.

    --
    I am using separate channels just split by a different criteria.
    For the sake of reducing distractions I have everything critical pushed as SMS+email. My watch is configured to vibrate on margin warning, data/broker/my software didn't pass a health check.

    Are you using slack to control your bot?

    I have ~20 commands to let me handle pretty much any emergency from my phone. Irreplaceable if I'm on vacation or traveling.

    PS. All my trading stack is in CI/CD pipeline. So a code change is as easy as changing a config or a lambda. Once I "git push" it's live under <1 min

    Val
     
    #42     Jul 16, 2020
    fan27 likes this.
  3. fan27

    fan27

    I am not using Slack to control my live trading but that is a great idea! What are some example commands you are using?
     
    #43     Jul 16, 2020
  4. ValeryN

    ValeryN

    Two separate bots, (trader = t) to control execution, (remote = r) second for overall trading stack. I use what they call "slash commands"

    "/t s" or "/t status" would pull a quick status report for everything I normally need. Other examples - pause/unpause executions, manually initiate some scheduled task, print execution environment internals like orders cache, force-reload signals from research software, override daily risk limits, emergency position liquidation/orders cancellation, state reset etc. Basically whatever I could possibly need to solve any abnormal situation on the go.

    On practice I mostly just get reports outside of normal schedule if I get time to look at them earlier than they are scheduled to execute automatically.

    /r <cmd> are to restart ib-gateway or my execution engine, manually trigger full CI/CD cycle or part of it. Mostly unused but I need them for then I need them.

    Whole execution stack if mostly "self-healing", to the extend I cared about at least. All apps including ib-gateway have health criteria, which is pretty complex for trader itself. Auto-recovery attempt will kick in if any don't pass. That is mostly enough to run for weeks without touching anything.

    Val
     
    #44     Jul 16, 2020
    fan27 likes this.
  5. fan27

    fan27

    Looks like you have a tight setup. Let me guess, you write software for your day job :)
     
    #45     Jul 16, 2020
  6. ValeryN

    ValeryN

    :D
     
    #46     Jul 16, 2020
    cruisecontrol and fan27 like this.
  7. ValeryN

    ValeryN

    Quick performance update: +8.54% in June, over 75 trades.

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

    No negative months this year so far, which is pretty unusual and not likely to last.

    June was quite volatile month for shorts but all systems were within expected parameters. Most also seen new highs which is great.

    Traded only thru first 2 weeks.

    For a first time in a while I decided to actually pause executions while I was working on software piece, because the change was too big and I needed to reduce distractions. My life outside of trading was extremely busy and all I could spare was 4-5 hours a day in the early mornings / evenings + more on weekends.

    So spent the rest of the month on more sophisticated version of orders management engine and risk control for intraday executions. Added lots of extra stats to capture automatically on a trade entry/exit level, such as borrowing/rebate rates at the time, margin requirements, variations of spreads, etc.

    For the lack of time I was literally troubleshooting in my sleep and going thru all sorts of edge case scenarios my software can encounter.

    While testing new version in late July I was staring at the market intraday. Few setups in ES/VXX looked just too easy to miss out on. Net result was just under +2%. But that's not something I'd normally do. Nevertheless - free rent for a few months :)

    In the upcoming months, I would not be surprised to see some nasty sharp drawdowns in short positions. Probably with relatively quick recoveries for the most part.

    Val
     
    #47     Jul 18, 2020
    _terminus_ and .sigma like this.
  8. Today is only July 19th, which I wouldn't call late July. Have you been "troubleshooting in your sleep" a bit too much? :)
     
    #48     Jul 18, 2020
  9. ValeryN

    ValeryN

    July 18 for some of us. Even now? :p Late June obviously.

    Btw, saw your last post in the futures thread - can related to that. Increasing software complexity was rarely contributing much to my profitability. With exceptions being when I knew exactly why I needed a change and how much money it was costing me not to make it.

    Val
     
    #49     Jul 19, 2020
    HobbyTrading likes this.
  10. .sigma

    .sigma

    Hey @ValeryN excellent journal man, really good stuff.

    you mentioned some great intraday set ups in ES and VXX. Care to explain what you saw that make you take these trades?
     
    #50     Jul 19, 2020
    qlai likes this.
Thread Status:
Not open for further replies.