Normally Zorro does not check your account before placing a trade, so you'd need to do that by script.
There's one exception: when the MARGINLIMIT flag is set, Zorro doesn't enter a new trade when the trade margin plus the trade risk exceeds the available margin left in the account. But this is a rather crude condition - finer adaption of the margin to the account size should be done by script.
Re: How to determine Margin in use / available?
[Re: jcl]
#433725 12/05/1313:2312/05/1313:23
Ok. If Zorro does not check the available margin, then that implies that during simulation, it would just assume all trades can be taken. That would then affect the "Capital required" figure, correct?
If that is correct, then presumably while live trading Zorro would proceed in the same fashion, attempting to take all trades with the live broker. If the live trading commenced within the statistical bounds of the simulation, then it should behave the same in live as tested in simulation (correct?)
Of course... I think this also implies that if live trading did NOT commence within the same statistical bounds of the simulation... then Zorro could attempt to take trades that the live broker would not allow. And thus the live account would be at risk of being denied opening a trade, or even a margin call.
(Please correct if I'm misunderstanding any of this)
Re: How to determine Margin in use / available?
[Re: dusktrader]
#433727 12/05/1315:4812/05/1315:48
I was thinking about this yesterday, and it occurred to me... that a multi-asset strategy has a sort of built-in "black swan protection" LOL.
They say that during black swan events, in general, markets tend to "sell off". Presumably they are talking about equity markets here. Because I don't see how currency markets could really sell off.
By trading multiple currencies, and preferably not too heavily weighted in any particular currency, it would seem that you are somewhat hedged against chaos. While one currency declines, another may increase. If both in the pair declined, then I think the pair value would just flatline.
Is this wrong logic?
Re: How to determine Margin in use / available?
[Re: dusktrader]
#433771 12/06/1317:3412/06/1317:34
Not sure about this logic, there would be a flight of speculative money out of all types of assets incl. currency pairs into cash.
This may be good in theory for reserve currencies, but it assumes your algos somewhat effectively hedge themselves and that you can get your longs filled on rising reserve currencies when everything else is collapsing - fills and spreads are the biggest issue with black swan events.
Using optf to determine position size based on the algos performance in normal conditions is unlikely to give you anything approaching a reasonable hedging for a black swan event.
My own thoughts on this would be that hedging against black swans is better achieved by options. See them as a monthly/quarlterly insurance policy against a black swan and just let the algos run as best they can. Calculating your black swan risk for your option strategy, now I only wish I could calculate that properly ;-)