Creating a trading system from scratch

How many lines of code you are comfortable with


  • Total voters
    61
For all, the present system may now work also with intraday data (the setup is ready may take a week to make it fully operational)

.So if more people are interested, I may continue posting about it. With this you could do things like, if gap up open and price less than open at 9:30, buy with a stop loss of 1 and exit at 11:00
Yes we are very interested. Please keep on posting.

Best Regards
 

kingkrunal

Well-Known Member
For all, the present system may now work also with intraday data (the setup is ready may take a week to make it fully operational)

.So if more people are interested, I may continue posting about it. With this you could do things like, if gap up open and price less than open at 9:30, buy with a stop loss of 1 and exit at 11:00
Let the games begin... all ready and set :)
 

UberMachine

Well-Known Member
Backtest results for some strategies.
This backtest is run from JAN 2012 - APR 2019. Since there is performance page on almost every website these days, I also decided to publish one. Instead of a list of trades, I have published a list of strategies. All results are computed (not just random ones) and have a good replication ratio.

These are just the results. Figure out what zero is? :)

Newbie alert: Don't try out any of these strategies. This is just to show what may go wrong with backtesting strategies
 

UberMachine

Well-Known Member
Master i am always ready to test
Sooner or later we all realise that human emotions override intelligence:D slow and steady wins the race and people who dont understand how much risk should be taken and what can be lost will sooner or later blow their account
Master i see you will be running a blackbox algo firm soon:p charging 25% of profits ,please guide us till then
Thanks. But there is still a long way to go. I believe intraday trading profits would depend a lot on machine learning in the coming years rather than rules based trading. (Just saw a report that around 75000 crores are invested in AIF's). I have just started trying it out in the real sense. Finding a flaw in a strategy is quite easy for me as of now but discovering out a new strategy is still some way to go. Right now, I am trying to find some factor between cash and futures but can't find it so far (it differs by the hour).

The present system works because its not smart and so its generalises to a lot of conditions (its not optimised, the stop loss is same, the weights are same); the main advantage is diversification.
So that works well but to squeeze out more need much better ideas.
 
Backtest results for some strategies.
This backtest is run from JAN 2012 - APR 2019. Since there is performance page on almost every website these days, I also decided to publish one. Instead of a list of trades, I have published a list of strategies. All results are computed (not just random ones) and have a good replication ratio.

These are just the results. Figure out what zero is? :)
Master is zero due non occurrence of events,
is this power of machine learning o_O please throw some light on how machine learning can be used for trading how does it help

What if we use it for betting on a single instrument we fix our capital and risk next we use a strategy that has better odds of being correct we start with 10 qty when signal is triggered if goes wrong we use 20qty on next signal
https://www.gamblingsites.com/systems-strategies/dalembert/
 
Last edited:

kingkrunal

Well-Known Member
Master is zero due non occurrence of events,
is this power of machine learning o_O please throw some light on how machine learning can be used for trading how does it help

What if we use it for betting on a single instrument we fix our capital and risk next we use a strategy that has better odds of being correct we start with 10 qty when signal is triggered if goes wrong we use 20qty on next signal
https://www.gamblingsites.com/systems-strategies/dalembert/
A strict no on martingale style in trading ...
 

UberMachine

Well-Known Member
Master is zero due non occurrence of events,
is this power of machine learning o_O please throw some light on how machine learning can be used for trading how does it help

What if we use it for betting on a single instrument we fix our capital and risk next we use a strategy that has better odds of being correct we start with 10 qty when signal is triggered if goes wrong we use 20qty on next signal
https://www.gamblingsites.com/systems-strategies/dalembert/
TL; DR
  1. Yes zero occurrence since the events never happened
  2. ML in finance is tough and tougher for intraday
  3. You can bet on a single instrument provided you have a high probability (about 70%) and enough capital. Practical advise: BUY options if you believe you have a high probability of winning.
Yes, spot on. Zero mean the event never happened in six and a half years. But if you look at the conditions, it may just look regular. This is just to illustrate that we can always get a good strategy if you backtest a sufficient number of tests (the size effect). And it is not machine larning, I just simulated the results with random strategies.

As @kingkrunal posted, its similar to Martingale strategy (not identical but for practical purposes, they are all the same). To do this, you must have enough capital and you must have no other expenses in case of a loss.

A simple illustration with binary option. Say, I you bet $100 and I give $200 if you win. To win, you must double your stake size here.
Say, you lose 3 bets consecutively. 100, 200, 400. Now you place a bet for 800 and win so you get 1600-800-400-200-100 = 100. Your return is 100/1500 not 100/100 (as commonly posted). But say you need to pay 5% for each stake. Then you get = 1600-1500-75(5% of 1500) = 25. You soon start losing and this is how gambling houses are designed.

For practical trading, we can use pure probability analysis such as say what is the possibility NIFTY would move up by 5% in the next 5 days if it has fallen by 5% percent in the last 3 days. If the probability is more and the payoff is positive, we can enter into a suitable options contract. This is how all options contracts are constructed.


Machine learning helps you automatically devise a system based on past patterns and probabilities. You don't need to manually specify them. Say, stocks with high volume over the last 30 days with a 21 day ATR less than 7 day ATR are prone to fall in the next 3 trading sessions. You can't think about it but ML can. Again, most ML are black boxes so you can't actually reverse engineer the rule from the results as easily as stated above.

And machine learning in finance, its tough than rules based trading and in my opinion most of them get it wrong (don't quote renaissance and a few successful firms :)). The problem is in constructing data, gaining insights, executing and following up with a system. You can just have a glance at this excellent book - advances in machine learning by del prado. Don't worry if you can't understand a lot of things, I am also not able to understand anything. :).
 
Thanks to all for sharing their indepth knowledge and for helping people like me to understand and do logical trading. Looking forward to have more on this

Sent from my Redmi Note 5 Pro using Tapatalk
 

Similar threads