Click here to Login





                                                   Accounting exact lot size of futures during back testing

  1

0
GS
2012-10-09 05:10:54


Hi,

I am still trying to figure out how do I take account of the exact size of futures contract during back testing. I now have an excel sheet having symbols and corresponding lot size, would appreciate if you could suggest how to use this information. A how-to or a blog on this topic would really help all the users.

Thanks



QuantShare
2012-10-09 11:08:02

  0

Select "Symbol -> Update Symbol" then update the "Round lot size" field.


GS
2012-10-09 11:54:30

  0

OK, that means I will have to do this for each symbol manually. I have 159 symbols, reading an excel sheet would be more convenient, do let me know if it is possible.


QuantShare
2012-10-09 11:58:52

  0

Another way to do that is by using the script editor.


GS
2012-10-20 03:54:38

  0

And after including lot size if suppose I want to backtest my strategy for cash market wherein number of shares need not to be in round lot size, do I have to delete values given in the "round lot size" field? If yes, it will be very difficult !!! In other words, my question is that do we have flexibility to backtest both, the strategy for cash as well as futures market without deleting data from "round lot size" field?

Also, I have observed that the value in the "tick size" filed is having "huge" impact on the performance outcome of a strategy. As per the NSE guidelines, the "tick size" for all the stocks is Rupees 0.05 (do let me know if this number makes sense to you). And if I include this value in the "Futures Setting" field, a positive strategy became significantly negative. I would also like to know if we have to give values of "Tick size" and "Round lot size" both, or if I have given value of "round lot size", "tick size" can be left blank? Similarly we have "Point value" and "Margin", again, do we have to give both the values? For me giving "round lot size" and "margin" will be most convenient.

I would also like to know if we can give "margin" as percentage of the contract price, if yes, how.

Looking at this, for any novice person, it will be very useful if we have a blog, covering various aspects of back testing, including cash, and F&O.

Thanks



QuantShare
2012-10-20 10:12:53

  0

do we have flexibility to backtest both, the strategy for cash as well as futures market without deleting data from "round lot size" field?

Either create a new symbol for cash market or create different accounts for cash and futures markets.

You can define any field or leave them empty. It depends on what you are trying to do.




GS
2012-10-20 11:23:31

  0

OK, having two accounts or two symbols will add to the physical memory requirement. Please look at the link given below wherein AmiBroker is providing a relatively cleaner way of back testing the strategy for Futures market:

http://www.amibroker.com/guide/h_futbacktest.html

I hope to see something similar in QS as well, may be after couple of versions from now.

>>You can define any field or leave them empty. It depends on what you are trying to do.

Here obviously my objective is to develop a robust and realistic strategy for Futures trading. For that if I create another account for Futures and fill in information about [A] round lot size and [B] margin, for each symbol using "Symbol -> Update symbol", to achieve my objective, what additional information is essential for me to provide within "Siuilation/backtesting -> Update -> Settings -> Futures settings". Can I leave "tick size" and "point value" field empty and expect the trading system to be realistic?



QuantShare
2012-10-20 11:46:53

  0

The link you provided is dead.
What you need is basically a button that specifies whether to perform a normal backtest or a future-mode backtest, right?


The backtester will first look at the symbol settings (Symbol -> Update Symbol). If a symbol field is empty then it will look for the value defined in the trading system ("Simulation -> Update -> Settings -> Futures settings"). If these fields are also empty then it will ignore them.

You can work without these fields and get approximately a good idea of the performance of your trading system.
If you update the "Point Value" field then it is important to update the "Margin Deposit" field too.

The "Margin" cannot be specified in percentage.



GS
2012-10-20 12:14:13

  1

I have corrected the link, you can check it now, it works. Yes, I want a button to select between normal and futures mode, also, having provision to give "percentage" for margin will ease out trouble of putting exact value, AmiBroker has it, why QS should not have, it will help users.

I agree that backtesting using cash market would give good idea about the performance of strategy. However, for me it is important to have a strategy backtested for Futures market. You have talked about "margin" and "point value", what about "tick size" ?



QuantShare
2012-10-20 12:45:46

  1

Thank you for the suggestions. They will be implemented in future versions.

The tick size is the minimum price movement of a trading instrument. You can usually leave this field empty.



Seeker
2014-11-12 10:40:12

  0

I just happened to notice that an enhancement done during Nov.'12 makes it possible to enter margin deposit as a percentage by preceding the number with the minus sign. If its 20% margin, its entered as -20.


No more messages
0




Reply:

No html code. URLs turn into links automatically.

Type in the trading objects you want to include: - Add Objects
To add a trading object in your message, type in the object name, select it and then click on "Add Objects"










QuantShare

Trading Items
Futures and Forex historical data
Last Gap Up/Gap Down Price Size
Historical futures data
Daily Futures Quotes
Open Interest Data for Equity, Index and Futures Securities

How-to Lessons
How to use the Fibonacci retracement drawing tool
How to remove non-active securities
How to get trading orders from a portfolio programmatically
How to add custom position-based metrics to your trading system
How to perform a basic quantitative analysis using the S&P 500

Related Forum Threads
Rules manager - comparing results - back testing vs rules analysi...
Back testing watch list
Bob K. seeks back testing information.
Parse Error in Back Testing
Back testing -

Blog Posts
Step by step on how to get free realtime/delayed data for stocks,...
Create a trading strategy using the money management tool - Part ...
9 mistakes you should avoid when backtesting an end-of-day stock ...
Looking for trading ideas
Create a stock index or a trading indicator using the composite t...









QuantShare
Product
QuantShare
Features
Create an account
Affiliate Program
Support
Contact Us
Trading Forum
How-to Lessons
Manual
Company
About Us
Privacy
Terms of Use

Copyright © 2024 QuantShare.com
Social Media
Follow us on Facebook
Twitter Follow us on Twitter
Google+
Follow us on Google+
RSS Trading Items



Trading financial instruments, including foreign exchange on margin, carries a high level of risk and is not suitable for all investors. The high degree of leverage can work against you as well as for you. Before deciding to invest in financial instruments or foreign exchange you should carefully consider your investment objectives, level of experience, and risk appetite. The possibility exists that you could sustain a loss of some or all of your initial investment and therefore you should not invest money that you cannot afford to lose. You should be aware of all the risks associated with trading and seek advice from an independent financial advisor if you have any doubts.