Creating a trading system from scratch

How many lines of code you are comfortable with


  • Total voters
    61

UberMachine

Well-Known Member
Btw one thing i got in backtest is NIFTYNEXT50 gives the best mean/std of 0.49 in last three months....so why dont we use it more...or are there any drawdown to that universe...:bookworm::bookworm:
You must use it. In fact, as already told in previous posts, I recommend using a combination of universe to get best results. One advantage with NIFTY 50 is its liquidity but in the long run NIFTY 50 is unlikely to give you positive results.
When backtesting, check open=high cases in universe. Filter them out and include a slippage of 0.1%. Mean return should be around 0.25% in the case and after commission you would be getting around 0.15% which is still good and allows for any errors
 

VJAY

Well-Known Member
result is a variable that must be declared by you.
If you have daily returns, you can use it
actually its looks our backtests and give result?or we need to put daily returns in new file ?confussion in it
 
Try total profit/capital. This woudl convert you result into percentages
You must use it. In fact, as already told in previous posts, I recommend using a combination of universe to get best results. One advantage with NIFTY 50 is its liquidity but in the long run NIFTY 50 is unlikely to give you positive results.
When backtesting, check open=high cases in universe. Filter them out and include a slippage of 0.1%. Mean return should be around 0.25% in the case and after commission you would be getting around 0.15% which is still good and allows for any errors
so you are saying make universe of open= high stocks ???n well one more thing i dont see a code for commission/slippage in backtest n when i change the commission percentage from 0.5 to 0.7 or 1.0 the profits remain the same....!!!
 

ncube

Well-Known Member
You must use it. In fact, as already told in previous posts, I recommend using a combination of universe to get best results. One advantage with NIFTY 50 is its liquidity but in the long run NIFTY 50 is unlikely to give you positive results.
When backtesting, check open=high cases in universe. Filter them out and include a slippage of 0.1%. Mean return should be around 0.25% in the case and after commission you would be getting around 0.15% which is still good and allows for any errors
Another scenario I tested is keeping risk to reward ratio constant, say 3% SL & 3% Profit target. The results do not change much, few of the cases it becomes worse. BTW how has the strategy performed today, it was a small loss day today for me about 0.14 % (0.7%/5) of invested amt at no leverage and is consistent with the backtest result. Also another observation is that if we place a market order, most of the trades are executed at open price. For few of the trades I have created the open price today...:)

With only sl of 3%:
1538404632941.png


With both SL & Target of 3%
1538404729614.png
 
Last edited:

UberMachine

Well-Known Member
Another scenario I tested is keeping risk to reward ratio constant, say 3% SL & 3% Profit target. The results do not change much. BTW how has the strategy performed today, it was a small loss day today for me about 0.14 % (0.7%/5) of invested amt at no leverage and is consistent with the backtest result. Also another observation is that if we place a market order, most of the trades are executed at open price. For few of the trades I have created the open price today...:)

With only sl of 3%:
View attachment 29007

With both SL & Target of 3%
View attachment 29008
I don't go with targets. It creates too many complications and difficult to replicate. Increasing the stop loss would invariably increase my profits but gets me a major drawdown for doomsday scenarios. In fact, keeping a target reduces the profitability and optimizes too much (so I stuck with generalization for better performance)
I only place limit orders at open price less a small percentage (to make sure that price has fallen)
This gets me the exact price, although I might lose some orders.
Today is a break even day; but my new live strategy resulted in a loss (I believe this is due to the extreme L&T FH, IDBI case)

I am also updating the performance on my website; may take a day or two so that you can check it.
 

Similar threads