You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently in txnsim we layer until there are no more longdf or shortdf rows to sample from. Combined with the maxpos conditional check, it means replicate duration can fall well short of the original strategy long and short duration.
For an example, see below screenshot from the R/Finance 2018 CFP submission for Round Turn Trade Simulation, based on txnsim. We can see the original strategy long and short duration is way off to the right of the replicate duration distributions.
Fix will involve sampling until duration resembles that seen in the original strategy, whilst still maintaining a check for maxpos.
The text was updated successfully, but these errors were encountered:
This commit has some significant changes to the way layering happens in the master branch. We layer until duration matches a predefined target, as opposed to only layering according to number of layers as determined by totaldur/calendardur.
The code is suboptimal, and while loops can run for a very very long time. Fixing this will be the subject of subsequent commits.
See #70
This commit also fixes#71
Strategies could be long only, and in rare and unlikely cases i suppose short only. This commit enables txnsim to work for long-only and short-only strategies.
see #70
Currently in txnsim we layer until there are no more longdf or shortdf rows to sample from. Combined with the maxpos conditional check, it means replicate duration can fall well short of the original strategy long and short duration.
For an example, see below screenshot from the R/Finance 2018 CFP submission for Round Turn Trade Simulation, based on txnsim. We can see the original strategy long and short duration is way off to the right of the replicate duration distributions.
Fix will involve sampling until duration resembles that seen in the original strategy, whilst still maintaining a check for maxpos.
The text was updated successfully, but these errors were encountered: