Hi everyone, first off I apologies if this is a dumb question and it's something simple I am missing but I am needing some help with creating a trading system for back-testing when the account parameters involve trading on margin. Just to give a bit of background I am trying to implement a back-test solution for back-testing different ideas in either a Spread Betting (for the UK) account or CFD account.
To keep things simple for now I am just focusing on Stocks. Each Stock can have a different %age margin required for making a purchase.
If my Account Value is $2000 and I want to buy 200 shares of a Stock trading at $10, this would usually take up my entire Account Value of $2000. If I am able to trade this Stock through my broker with a 10% margin I only need to use $200 from my Account Value (though I understand my exposure is still $2000), leaving me with $1800 to open up other trades if I so wished.
How do I configure a trading system in RE in such a way that when my system opens a position it will only use up n% (in this example, 10%) of my Account Value.