How it works?

Discussion in 'Automated Trading' started by Jfranco_2003, Jul 21, 2019.

  1. How the automated trading works? Automatic entries? Scalping? I have never seen an automated trading software working and I had the idea that they didn't work, but I have been reading some threads here and the people speaks how if they work.

    Can someone tell me about that, and what means high/low frecuency?
     
    Masterchanger likes this.
  2. I can tell you what I've done and it's pretty much the only thing I've actually made work:

    1. Develop a manual strategy
    2. Write out every single step involved in this strategy
    3. Automate parts of it

    The other thing that definitely works is using code to gather statistical information about various markets like "how does X behave under Y conditions".

    Probably one day it'll all click for me and I can let the algos do all the work but I'm not Simons yet.
     
    Jfranco_2003 likes this.
  3. expiated

    expiated

    Handle123 says he has automated a number of systems. Maybe he can help you out.
     
    nooby_mcnoob likes this.
  4. Writing code to recognize common manually traded patterns can be quite involved. The way humans sometimes process visual cues involves learning that currently, desktop computers have a hard time with. If you just want to automate a simple mean regression strategy that would be relatively easy but you would probably be taking profits much sooner than in manual trading, and so profits would maybe be a bit less, on an hour by hour, trade by trade basis. The advantage would be that the computer could effortlessly manage a dozen or more positions at once. In this example you would need your code to recognize breakout situations and you would want to be alerted so you could trade them manually, or write some rather complex code to do it for you. Yes, obviously automated trading works. The big investment and trading firms do it all the time. Literally. They also have talented programmers constantly tweaking the code so it doesn't stop working when conditions change or every other trading computer is doing the exact same thing at the exact same time.

    The fact of the matter is, if you can't trade manually, you can't trade algorithmically. Who is gonna write your code? Your programmer has to be a good trader. If he is a good trader and knows how to write code that will trade profitably, why would he work for you? How much are you going to pay him? Are you a trader? I suggest you learn Python and maybe C and/or C++, download an API, and try your hand at automating your favorite strategy. It can be done, and it can be profitable. So can simply doing the trade yourself.

    I would love to write an app that would recognize a bull flag situation, and another, and another, however many, and keep looking for more, and trade each one the same way I would trade them. I work most profitably when I am managing only one or at most two open positions at once. The computer could do a whole bunch of them. If not I would just get a bigger computer. But that is outside my level of expertise, certainly for now and maybe ultimately. If you think you can do it, go for it.

    If you expect to buy an app from someone else that will do this, there ARE plenty of them for sale out there. But why would anybody sell it? It would be like selling the Keebler hollow tree instead of just keeping it and dealing in cookies. Unless the hollow tree was having production issues or legal difficulties or technical problems or was simply FAKE or maybe wish-ware. I'll put it this way... If I wrote an effective autotrading app, I wouldn't sell it to anybody until it stopped working. I would simply run it and keep ALL the cookies.

    That's not to say that there actually aren't ready to rock autotrading apps out there that will make you dumpster loads of money. But think about it. Why would anybody share the golden goose with you? For mere chump change? I was just looking at one of thsoe apps and noticed that there was of course no guarantee it would work, it was pay in full up front for the app, and there was no free trial or demo version. I wonder why?

    The concept is good. It can work. That is proven every day. The trick is you have to be able to code, you have to be able to trade profitably, and you have to be able to change your algo to match changes in the market.

    I might also point out that if your app goes rogue and loses your entire account in seconds, you kinda have to start all over again from scratch. Just sayin.

    Learn to trade first. You may well find that the idea holds a little less charm once you actually do have the skills to pull it off. And if you still want to go for it once you are making consistent profits in manual trading, then become a programmer and give it a go.
     
    Handle123, Jfranco_2003 and expiated like this.
  5. :D:D Another part of trading that I know now, thanks you:D:D
     
  6. Handle123

    Handle123

    I develop an idea based on past experiences of how price flows or call it structure, have already made risk management unit, and that is like a "hugest block" of the system of when not to take viable signals, how much to risk, when to move to breakeven plus one tick or fees plus lunch, when to exit or reverse or hedge, number of patterns which some are turned on depending where in "mean" swing length, some turned off as well, and this unit is never finished. So I have a set of filters or rules, then I must trade one lot 2 or 3 days a week, changing days each week for 3 months to better understand if it works in real time. During this time, rules change to make it more consistent or add formulas when volatility expands or tightens or when ranges of bars are too small to make a 3-5 tick scalp, so entire day session is traded or not traded depending on how you are entering the market. Have systems of scalping off seconds timeframe to monthly timeframes.

    If at the end of the 3 months if fits my rigid parameters of drawdown and equity curve, then I refine definitions to send to my partner who will program them into automation and be able to back test 14-15 years till we get 15-25k sample size on each signal. I thought about hiring more people to program, but comes down to trust with me, I known him nearly two decades.

    Most don't have to go that amount, 3000 would be fair enough number, but I like averaging down, so more data better for me. After back testing, it is real time sim traded for 3-6 months. Yes, I use very long process, always have several models in sim.

    Some trade 24 hours, some trade 24 hours of five minutes lengths and turn off, Some trade to produce one signal an hour then by pass all signals till next hour, all change in some ways depending of times of the day. I think for most would be an improbable task, but I prefer it to manually trading, plus it can follow all the commodity markets, over 25k stock and option symbols, and using more than one language of C++, Python and R. I spend my day getting couple dozen charts he sends me to check if signals or all the ways trend changes are correct. You can make it simple codes or very complex depending on the skills of programmer. One must need to take into account of multiple systems is way too many signals for funds you have, so then you make another filter, like a funnel to reduce all the signals.

    @GrowleyMonster is so correct on difficulty of price patterns to code them, took us 3 months to code my version of H&S, of course not strictly doing it every moment.

    We both find this very fun, major major challenges, exciting to see it produce while sipping coffee at Starbucks. I could not fathom doing both halves myself.
     
    birdman and Jfranco_2003 like this.
  7. ValeryN

    ValeryN

    I have been an observer on this forum for some time now, not sure why now, but feeling like making my first contribution.

    There are a lot of different ways people approach trading, it is remarkably difficult to find those who actually do have a working mechanical system, which is required for any automated trading. Such system itself has to be able to generate entry/exit signals, determine positions size and maximum positions number. All of that is done using some high-quality data source which is continuously updated and has enough data to backtest the system's performance on. Basically, that system is responsible for all the trading rules. How often entries are done greatly varies, you can have anywhere from few per second to few per month. The more trades - the more expensive your data and execution infrastructure/software will cost.

    Assuming you have a mechanical system - you need to figure out how to run it (automated trading). By running I mean - actually entering orders based on the system's signals with your broker, monitoring and recording executions, limiting the number of concurrently open positions and (preferably) generating reports along the way. Perhaps few more things, depending on a market and whatever is required to follow that mechanical system.

    Assuming you have both - most retail traders actually do some semi-automation or just execute manually in accordance with their mechanical system rules. Meaning - at the best of their ability. You'll hear lots of complains from them - how their actual performance wasn't good, but their system still works in backtesting. If your system gives you a few trades per minute - that's beyond a human ability to execute reliably to long enough time, not sure how many people are trading those, I'd imagine most individual mechanical traders execute a few trades per day or even a week kinda systems.

    On the other end of the spectrum - full automation of execution. It is very possible but outside of technical abilities for most. Some hire a developer. 100% automation of execution is not unheard of but is very rare. In that case, a trader is reviewing result/reports generated by the automation at least daily and decides if all runs within expected parameters. Rational to automate ranges from - don't want to stay glued to a screen whole day to impossible to execute manually. Let's say if you're trading Russel 3000 universe of stocks and have many signals from your system (typically are conditional entry rules if the price hits certain level) - chances are that you will miss your entries, too many stocks to watch.

    Perhaps an example would also help. This is just 1 out of a million ways how to do it.
    I trade US Equities and have a number of mechanical systems which generate signals for entries and exits, as well as position sizes and maximum numbers of open longs/shorts depending on wherever market conditions are favorable for that system or not. Execution is 100% automated.

    How my automation setup works:
    1. A batch job runs on research machine with backtesting software every 1 hour to (a) update data (b) run the mechanical system on the latest data and generates next day signals (c) run the system on yesterday data to see which signals triggered according to backtest (d) prepare mini-market data dump with key indicators and values for system execution (e) send all of that to a data store on AWS.
    2. "trader", my execution software runs 24/7 on a Linux server. And does 3 things: (1) executes trades according to the system signals (2) periodically picks up new data from the data store (3) sends out alerts/reports on key events (4) provides APIs for remote control via Slack Bot
    3. "trader" has a Slack bot that gives me an ability to get all-important reports and receive alerts if something important happened. Since backtest results are run continuously and fed to "trader" app, it automatically does a comparison of live vs backtest execution which is extremely important when running a mechanical system
    Normally there are ~30-200 signals for every day coming from step #1, execution software does a lot of work but actual executions are very infrequent, ~1-2 new entries per day on average, positions are held from 1 to 10 days. On some days there can be too many signals triggering simultaneously and execution software stops opening new positions after reaching pre-defined max for long/short/per strategy. During market hours execution software dumps status reports capturing how far prices are from my entry points etc (mostly for troubleshooting if something goes wrong). After market close I run "/trader eod" and receive a detailed
    End of Day report with:
    1. Status of next trading session data (how many signals loaded/when they were generated etc)
    2. Live vs backtest trades
    3. Account balances
    4. Open positions and if there are exits anticipated next day
    If next day data is received, live trades match backtest - all is good and nothing to do, that's what happens on most days. Then can quickly browse thru traded charts to feed subconscious with the info for new strategies ideas or betterment of current systems. All observations are written to daily journals.

    Example of execution report below (intentionally detailed)

    [​IMG]
     
    Last edited by a moderator: Jul 25, 2019
    yc47ib, nooby_mcnoob and Jfranco_2003 like this.
  8. I was thinking about this topic, and I don't have doubt that this is the future of the financial markets. I don't know anything of programming, but I'm realizing that, in the near future, I will have to learn about it if I wan't to be a more profitable trader. Thanks boys
     
  9. Trading in function of this price patterns is profitable? I have a lot of time that I don't search this type of things to enter in a trade
     
  10. You left me shocked, and your program left me impressed. Thanks you bro:wtf::D
     
    #10     Jul 26, 2019