MTM using Close together with customized data fields
Author: stanleywang
Creation Date: 7/26/2013 4:37 AM
profile picture

stanleywang

#1
hi folks,

new to the product and new to c# as well. have searched the forum but could not find this topic, or maybe i missed out. anyway, here is the problem i have.
to test a strategy on an OTC FX say EURUSD, i would assume a 3 months forward position is taken at the entry. then as day passes i will need to mark the position with the corresponding broken date level. which is calculated from the SPOT of the day, and the implied swappoint from 1M, 2M and 3M swappoints. so my raw data would be OHLC of spot, as well as 3 additional columns of 1M, 2M and 3M swappoints of the day.
as of now i have been manually calculating the daily MTM lvl and get the daily MTM PnL and display the PnL curve on a customized ChartPane. but then will not be able to have the benefit of the Performance, Equity Curve, Drawdown and other inbuild visualizers, coz they were calculated based on Close price MTM only, not with the customized swappoints. also i will not enjoy the handy portfolio level of backtesting.

may i know what is the right approach to it? either let the system know my customized way of MTM, or build own performance visualizer. any similar issues you guys encounter?

cheers,
Stanley
profile picture

Eugene

#2
Hi Stanley,

Welcome to the forums. There's a good chance I that may be misinterpreting your problem, but could it help if you export those custom fields as virtual OHLC bars, and then import them into Wealth-Lab as a DataSet, and backtest on this data (rather than the original OHLC series)?

How to create a DataSet from SaveToFile() *.WL data, see "Update 7/26/2013" at the bottom of post #2
profile picture

stanleywang

#3
Hi Eugene,

thanks for the reply!
here i am facing a different problem. unlike creating a continuous contract, where the historical ohlc can be modified at once. To mark a broken date outright position, i have to calculate the broken date swap point from the 1M, 2M and 3M points of that date. and there is no fixed format of a modifited OHLC as position entered at different date will have different broken date tenor to be calculated.
hope this clarifies my question.

Cheers,
Stanley
profile picture

Eugene

#4
You're giving me too much credit: that sounds like Greek to me. ;)

To benefit from using the built-in visualizers, you have to run backtests on a modified OHLC data. In your script-based or visualizer solution, you can implement any logic.
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).