Skip to content

Commit

Permalink
Expanding PnL attribution to cover MC models
Browse files Browse the repository at this point in the history
  • Loading branch information
gavbrennan committed May 28, 2024
1 parent 4d753ff commit af115e5
Show file tree
Hide file tree
Showing 2 changed files with 519 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/Qwack.Models/Models/AssetProductEx.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
using Qwack.Core.Instruments.Funding;
using Qwack.Core.Models;
using Qwack.Dates;
using Qwack.Futures;
using Qwack.Math;
using Qwack.Math.Interpolation;
using Qwack.Models.MCModels;
Expand Down Expand Up @@ -1685,6 +1686,12 @@ public static IAssetFxModel RollModel(this IAssetFxModel model, DateTime fwdValD
return rolledModel;
}

public static AssetFxMCModel RollModel(this AssetFxMCModel model, DateTime fwdValDate, ICurrencyProvider currencyProvider, IFutureSettingsProvider futureSettings, ICalendarProvider calendarProvider, bool fillFixings = true)
{
var rolledVanilla = model.VanillaModel.RollModel(fwdValDate,currencyProvider, fillFixings);
return new AssetFxMCModel(rolledVanilla.BuildDate, model.Portfolio, rolledVanilla, model.Settings, currencyProvider, futureSettings, calendarProvider);
}

public static IAssetFxModel RollModelPfe(this IAssetFxModel model, DateTime fwdValDate, double confidenceInterval,
ICurrencyProvider currencyProvider, ICalendarProvider calendarProvider, List<string> fxPairsToRoll)
{
Expand Down
Loading

0 comments on commit af115e5

Please sign in to comment.