Click here to Login





                                                   Weird behavior while simulating a trading system!

  1

0
Praveen Baratam
2016-03-30 13:09:55


My trading system generates both buy/sell and short/cover signals for futures. The futures contract I wish to trade needs 8% margin to take position.

Now I have set the required setting in the Trading System - Settings - Futures.

In Capital settings - I have merged both buy & short categories and set max positions to 1 so that a short signal closes a long position if there is one and then opens a short position.

Everything is working fine except when the system generates a short signal when there is an existing long position.

On the day when the long position is closed and a new short position is opened - the size of the short position is much larger than what my capital allows.

Symbol Trade Entry Exit Perf Profit Shares Pos. value
NIFTYFUTIDX-NEAR Long 17-05-13 0:00 22-05-13 0:00 -0.010251353 -123764.6493 1950 840011.1507
NIFTYFUTIDX-NEAR Short 22-05-13 0:00 24-05-13 0:00 0.019879195 2969266.263 24375 14897221.26

Ideally, the trading system should close the long position of 1950 contracts and open a new short position of 1950 contracts.

But it is opening a new short position of 24375 contracts. My capital certainly does not allow for such a huge position, unless the system is considering the entire long position value (not just the 8% margin deposited) to be my capital.

The numbers certainly hint this way. If the entire value of 1950 contracts is assumed to be my capital then I can put that as margin for a short position of 24375 contracts.

The bug could be in the Trading System - Settings - Capital - Orders - Pending Orders = Market Orders.

While calculating the value of a position taken with a margin it is assuming the value to be its entire value.

Can someone throw more light on this wierd behaviour.

Thanks in advance.



QuantShare
2016-03-31 06:27:02

  0

Please contact us via email regarding this


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
Insider trading data
Time-series Sum for the first Minutes/Hours of a Trading Day
InSync Index - Consensus Trading Indicator
Estimation of the Hurst Exponent - Trading Indicator
Crossover/Convergence of Several Trading indicators

How-to Lessons
How to add custom position-based metrics to your trading system
How to create a trading system
How to detect stocks trading near all time highs
How to import trading items from other accounts
How to add a trading indicator to a chart

Related Forum Threads
Trading strategy backtesting
Script Trading Example
audio /video tutorial of trading objects
Combined Trading System report causes hang
How to read the number of positions in trading system

Blog Posts
Money Management: Scale-in Trading Strategy
Looking for trading ideas
Let me Show You How to Create Hundreds of Profitable Trading Syst...
Backtesting trading strategies using intraday data
Aspiring Forex Traders Should Consider Upgrading Their Trading So...









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.