Hi,
when simualting a futures strategy the exposure numbers shown in the "Period" tab
- are based on margin
- show always absolute numbers.
I need to have exposure based on
- the value of the future, so exposure = pointvalue * contracts * price
- be negative for short trades.
How can I calcualte this?
Size:
Color:
this would also be a suggestion for a new Performance Visualizer: "Exposure Analysis".
Size:
Color:
You could calculate it (or anything else) as a custom performance metric in a visualizer. The logic is as follows. Visualizers have access to Positions through the
SystemPerformance and
SystemResults objects.
A Position has the required properties:
1. point value = Position.Bars.SymbolInfo.PointValue;
2. contracts = Position.Size
3. price = Position.EntryPrice
On a given bar, you'd calculate the custom exposure metric. Please see the open source code of Community.Visualizers:
Home - Community Visualizers Community.ScorecardWealth-Lab Version 5 (.NET) Development Guide - Creating Performance Visualizers
Size:
Color: