diff --git a/clients/Qwack.Excel/Capital/CapitalFunctions.cs b/clients/Qwack.Excel/Capital/CapitalFunctions.cs index 790a1626..aa20e0de 100644 --- a/clients/Qwack.Excel/Capital/CapitalFunctions.cs +++ b/clients/Qwack.Excel/Capital/CapitalFunctions.cs @@ -21,7 +21,7 @@ public class CapitalFunctions { private static readonly ILogger _logger = ContainerStores.GlobalContainer.GetService()?.CreateLogger(); - [ExcelFunction(Description = "Computes SA-CCR EAD", Category = CategoryNames.Capital, Name = CategoryNames.Capital + "_" + nameof(ComputeEAD), IsThreadSafe = true)] + [ExcelFunction(Description = "Computes SA-CCR EAD", Category = CategoryNames.Capital, Name = CategoryNames.Capital + "_" + nameof(ComputeEAD))] public static object ComputeEAD( [ExcelArgument(Description = "Portfolio object")] string PortfolioName, [ExcelArgument(Description = "AssetFx model")] string VanillaModel, @@ -39,7 +39,7 @@ public class CapitalFunctions } - [ExcelFunction(Description = "Computes CVA from an EPE profile", Category = CategoryNames.Capital, Name = CategoryNames.Capital + "_" + nameof(ComputeCVA), IsThreadSafe = true)] + [ExcelFunction(Description = "Computes CVA from an EPE profile", Category = CategoryNames.Capital, Name = CategoryNames.Capital + "_" + nameof(ComputeCVA))] public static object ComputeCVA( [ExcelArgument(Description = "Hazzard curve")] string HazzardCurveName, [ExcelArgument(Description = "Origin date")] DateTime OriginDate, @@ -76,7 +76,7 @@ public class CapitalFunctions }); } - [ExcelFunction(Description = "Computes approximate CVA for a portfolio", Category = CategoryNames.Capital, Name = CategoryNames.Capital + "_" + nameof(ComputeCVAApprox), IsThreadSafe = true)] + [ExcelFunction(Description = "Computes approximate CVA for a portfolio", Category = CategoryNames.Capital, Name = CategoryNames.Capital + "_" + nameof(ComputeCVAApprox))] public static object ComputeCVAApprox( [ExcelArgument(Description = "Hazzard curve")] string HazzardCurveName, [ExcelArgument(Description = "Origin date")] DateTime OriginDate, @@ -99,7 +99,7 @@ public class CapitalFunctions }); } - [ExcelFunction(Description = "Solves strike for a target RoC", Category = CategoryNames.Capital, Name = CategoryNames.Capital + "_" + nameof(SolveStrikeForTargetRoC), IsThreadSafe = true)] + [ExcelFunction(Description = "Solves strike for a target RoC", Category = CategoryNames.Capital, Name = CategoryNames.Capital + "_" + nameof(SolveStrikeForTargetRoC))] public static object SolveStrikeForTargetRoC( [ExcelArgument(Description = "Hazzard curve")] string HazzardCurveName, [ExcelArgument(Description = "Discount curve")] string DiscountCurve, @@ -124,7 +124,7 @@ public class CapitalFunctions }); } - [ExcelFunction(Description = "Computes Basel II CVA risk weighted assets from an EPE profile", Category = CategoryNames.Capital, Name = CategoryNames.Capital + "_" + nameof(ComputeCvaRwaBaselII_IMM), IsThreadSafe = true)] + [ExcelFunction(Description = "Computes Basel II CVA risk weighted assets from an EPE profile", Category = CategoryNames.Capital, Name = CategoryNames.Capital + "_" + nameof(ComputeCvaRwaBaselII_IMM))] public static object ComputeCvaRwaBaselII_IMM( [ExcelArgument(Description = "Origin date")] DateTime OriginDate, [ExcelArgument(Description = "EPE profile, cube or array")] object EPEProfile, @@ -158,7 +158,7 @@ public class CapitalFunctions } - [ExcelFunction(Description = "Computes Basel III CVA capital from an EPE profile", Category = CategoryNames.Capital, Name = CategoryNames.Capital + "_" + nameof(ComputeCVACapitalBaselIII), IsThreadSafe = true)] + [ExcelFunction(Description = "Computes Basel III CVA capital from an EPE profile", Category = CategoryNames.Capital, Name = CategoryNames.Capital + "_" + nameof(ComputeCVACapitalBaselIII))] public static object ComputeCVACapitalBaselIII( [ExcelArgument(Description = "Origin date")] DateTime OriginDate, [ExcelArgument(Description = "EPE profile, cube or array")] object EPEProfile, diff --git a/clients/Qwack.Excel/ContainerStores.cs b/clients/Qwack.Excel/ContainerStores.cs index 2b2fa98d..9e98d7f5 100644 --- a/clients/Qwack.Excel/ContainerStores.cs +++ b/clients/Qwack.Excel/ContainerStores.cs @@ -1,5 +1,7 @@ using System; +using System.Collections.Generic; using System.IO; +using System.Linq; using System.Reflection; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; @@ -37,24 +39,26 @@ static ContainerStores() PnLAttributor = new PnLAttributor(); } - catch(Exception ex) + catch (Exception ex) { - if(Directory.Exists(@"C:\Temp")) + if (Directory.Exists(@"C:\Temp")) { File.WriteAllText($@"C:\Temp\QwackInitializationError_{DateTime.Now:yyyyMMdd_HHmmss}.txt", ex.ToString()); } } - } - + } + public static IServiceProvider GlobalContainer { get; internal set; } - public static IServiceProvider SessionContainer { get;set;} + public static IServiceProvider SessionContainer { get; set; } public static ICurrencyProvider CurrencyProvider => GlobalContainer.GetRequiredService(); public static ICalendarProvider CalendarProvider => GlobalContainer.GetRequiredService(); public static IFutureSettingsProvider FuturesProvider => GlobalContainer.GetRequiredService(); public static ILogger GetLogger() => GlobalContainer.GetRequiredService().CreateLogger(); - public static IPnLAttributor PnLAttributor { get; set; } + private static Dictionary _registeredTypes = new Dictionary(); + public static IPnLAttributor PnLAttributor { get; set; } + private static string GetFutureSettingsFile() => Path.Combine(GetRunningDirectory(), _futureSettingsFile); private static string GetRunningDirectory() @@ -68,8 +72,22 @@ private static string GetRunningDirectory() private static string GetCalendarFilename() => Path.Combine(GetRunningDirectory(), _calendarJSONFile); private static string GetCurrenciesFilename() => Path.Combine(GetRunningDirectory(), _currenciesFile); - public static IObjectStore GetObjectCache() => SessionContainer.GetService>(); + public static IObjectStore GetObjectCache() + { + var os = SessionContainer.GetService>(); + _registeredTypes[typeof(T)] = os; + return os; + } public static T GetObjectFromCache(string name) => SessionContainer.GetService>().GetObject(name).Value; - public static void PutObjectToCache(string name, T obj) => SessionContainer.GetService>().PutObject(name, new SessionItem { Name = name, Value = obj, Version = 1 }); + public static void PutObjectToCache(string name, T obj) => GetObjectCache().PutObject(name, new SessionItem { Name = name, Value = obj, Version = 1 }); + + public static void FlushCache() => SessionContainer.GetService>().Clear(); + public static void FlushAllCaches() + { + foreach (var t in _registeredTypes) + { + t.Value.Clear(); + } + } } } diff --git a/clients/Qwack.Excel/Cubes/CubeFunctions.cs b/clients/Qwack.Excel/Cubes/CubeFunctions.cs index a48dafb1..cf01fdaf 100644 --- a/clients/Qwack.Excel/Cubes/CubeFunctions.cs +++ b/clients/Qwack.Excel/Cubes/CubeFunctions.cs @@ -15,7 +15,7 @@ public class CubeFunctions { private static readonly ILogger _logger = ContainerStores.GlobalContainer.GetService()?.CreateLogger(); - [ExcelFunction(Description = "Displays a cube object", Category = CategoryNames.Cubes, Name = CategoryNames.Cubes + "_" + nameof(DisplayCube), IsThreadSafe = true)] + [ExcelFunction(Description = "Displays a cube object", Category = CategoryNames.Cubes, Name = CategoryNames.Cubes + "_" + nameof(DisplayCube))] public static object DisplayCube( [ExcelArgument(Description = "Cube name")] string ObjectName, [ExcelArgument(Description = "Pad output with whitespace beyond edges of result - defualt false")] object PaddedOutput) @@ -55,7 +55,7 @@ public class CubeFunctions }); } - [ExcelFunction(Description = "Displays value of a cube object for given row", Category = CategoryNames.Cubes, Name = CategoryNames.Cubes + "_" + nameof(DisplayCubeValueForRow), IsThreadSafe = true)] + [ExcelFunction(Description = "Displays value of a cube object for given row", Category = CategoryNames.Cubes, Name = CategoryNames.Cubes + "_" + nameof(DisplayCubeValueForRow))] public static object DisplayCubeValueForRow( [ExcelArgument(Description = "Cube name")] string ObjectName, [ExcelArgument(Description = "Row index, zero-based")] int RowIndex) @@ -75,7 +75,7 @@ public class CubeFunctions }); } - [ExcelFunction(Description = "Creates a cube object", Category = CategoryNames.Cubes, Name = CategoryNames.Cubes + "_" + nameof(CreateCube), IsThreadSafe = true)] + [ExcelFunction(Description = "Creates a cube object", Category = CategoryNames.Cubes, Name = CategoryNames.Cubes + "_" + nameof(CreateCube))] public static object CreateCube( [ExcelArgument(Description = "Cube name")] string ObjectName, [ExcelArgument(Description = "Header range")] object[] Headers, @@ -109,7 +109,7 @@ public class CubeFunctions }); } - [ExcelFunction(Description = "Creates a new cube object by aggregating another cube object", Category = CategoryNames.Cubes, Name = CategoryNames.Cubes + "_" + nameof(AggregateCube), IsThreadSafe = true)] + [ExcelFunction(Description = "Creates a new cube object by aggregating another cube object", Category = CategoryNames.Cubes, Name = CategoryNames.Cubes + "_" + nameof(AggregateCube))] public static object AggregateCube( [ExcelArgument(Description = "Output cube name")] string OutputObjectName, [ExcelArgument(Description = "Input cube name")] string InputObjectName, @@ -130,7 +130,7 @@ public class CubeFunctions }); } - [ExcelFunction(Description = "Creates a new cube object by filtering another cube object", Category = CategoryNames.Cubes, Name = CategoryNames.Cubes + "_" + nameof(FilterCube), IsThreadSafe = true)] + [ExcelFunction(Description = "Creates a new cube object by filtering another cube object", Category = CategoryNames.Cubes, Name = CategoryNames.Cubes + "_" + nameof(FilterCube))] public static object FilterCube( [ExcelArgument(Description = "Output cube name")] string OutputObjectName, [ExcelArgument(Description = "Input cube name")] string InputObjectName, @@ -152,7 +152,7 @@ public class CubeFunctions }); } - [ExcelFunction(Description = "Creates a new cube object by sorting another cube object", Category = CategoryNames.Cubes, Name = CategoryNames.Cubes + "_" + nameof(SortCube), IsThreadSafe = true)] + [ExcelFunction(Description = "Creates a new cube object by sorting another cube object", Category = CategoryNames.Cubes, Name = CategoryNames.Cubes + "_" + nameof(SortCube))] public static object SortCube( [ExcelArgument(Description = "Output cube name")] string OutputObjectName, [ExcelArgument(Description = "Input cube name")] string InputObjectName, @@ -172,7 +172,7 @@ public class CubeFunctions }); } - [ExcelFunction(Description = "Lists distinct values in a specified field for a given cube", Category = CategoryNames.Cubes, Name = CategoryNames.Cubes + "_" + nameof(FieldValues), IsThreadSafe = true)] + [ExcelFunction(Description = "Lists distinct values in a specified field for a given cube", Category = CategoryNames.Cubes, Name = CategoryNames.Cubes + "_" + nameof(FieldValues))] public static object FieldValues( [ExcelArgument(Description = "Input cube name")] string InputObjectName, [ExcelArgument(Description = "Field name")] string FieldName) @@ -188,7 +188,7 @@ public class CubeFunctions }); } - [ExcelFunction(Description = "Produces a matrix for two given fields from a given cube", Category = CategoryNames.Cubes, Name = CategoryNames.Cubes + "_" + nameof(CubeToMatrix), IsThreadSafe = true)] + [ExcelFunction(Description = "Produces a matrix for two given fields from a given cube", Category = CategoryNames.Cubes, Name = CategoryNames.Cubes + "_" + nameof(CubeToMatrix))] public static object CubeToMatrix( [ExcelArgument(Description = "Input cube name")] string InputObjectName, [ExcelArgument(Description = "Field name vertical")] string FieldNameV, @@ -206,7 +206,7 @@ public class CubeFunctions }); } - [ExcelFunction(Description = "Writes contents of cube object to csv", Category = CategoryNames.Cubes, Name = CategoryNames.Cubes + "_" + nameof(CubeToCSV), IsThreadSafe = true)] + [ExcelFunction(Description = "Writes contents of cube object to csv", Category = CategoryNames.Cubes, Name = CategoryNames.Cubes + "_" + nameof(CubeToCSV))] public static object CubeToCSV( [ExcelArgument(Description = "Input cube name")] string InputObjectName, [ExcelArgument(Description = "Output filename")] string FileName) @@ -222,7 +222,7 @@ public class CubeFunctions }); } - [ExcelFunction(Description = "Reads contents of cube object from csv", Category = CategoryNames.Cubes, Name = CategoryNames.Cubes + "_" + nameof(CubeFromCSV), IsThreadSafe = true)] + [ExcelFunction(Description = "Reads contents of cube object from csv", Category = CategoryNames.Cubes, Name = CategoryNames.Cubes + "_" + nameof(CubeFromCSV))] public static object CubeFromCSV( [ExcelArgument(Description = "Output cube name")] string ObjectName, [ExcelArgument(Description = "Input filename")] string FileName) @@ -234,7 +234,7 @@ public class CubeFunctions }); } - [ExcelFunction(Description = "Creates a new cube, adding a bucketed time field", Category = CategoryNames.Cubes, Name = CategoryNames.Cubes + "_" + nameof(BucketTimeAxis), IsThreadSafe = true)] + [ExcelFunction(Description = "Creates a new cube, adding a bucketed time field", Category = CategoryNames.Cubes, Name = CategoryNames.Cubes + "_" + nameof(BucketTimeAxis))] public static object BucketTimeAxis( [ExcelArgument(Description = "Output cube name")] string OutputObjectName, [ExcelArgument(Description = "Input cube name")] string InputObjectName, diff --git a/clients/Qwack.Excel/Curves/IRCurveFunctions.cs b/clients/Qwack.Excel/Curves/IRCurveFunctions.cs index 421cd44b..f8685bc1 100644 --- a/clients/Qwack.Excel/Curves/IRCurveFunctions.cs +++ b/clients/Qwack.Excel/Curves/IRCurveFunctions.cs @@ -22,7 +22,7 @@ public class IRCurveFunctions { private static readonly ILogger _logger = ContainerStores.GlobalContainer.GetService()?.CreateLogger(); - [ExcelFunction(Description = "Creates a discount curve", Category = CategoryNames.Curves, Name = CategoryNames.Curves + "_" + nameof(CreateDiscountCurveFromCCRates), IsThreadSafe = true)] + [ExcelFunction(Description = "Creates a discount curve", Category = CategoryNames.Curves, Name = CategoryNames.Curves + "_" + nameof(CreateDiscountCurveFromCCRates))] public static object CreateDiscountCurveFromCCRates( [ExcelArgument(Description = "Object name")] string ObjectName, [ExcelArgument(Description = "Curve name")] object CurveName, @@ -56,7 +56,7 @@ public class IRCurveFunctions }); } - [ExcelFunction(Description = "Creates a discount curve", Category = CategoryNames.Curves, Name = CategoryNames.Curves + "_" + nameof(CreateDiscountCurveFromRates), IsThreadSafe = true)] + [ExcelFunction(Description = "Creates a discount curve", Category = CategoryNames.Curves, Name = CategoryNames.Curves + "_" + nameof(CreateDiscountCurveFromRates))] public static object CreateDiscountCurveFromRates( [ExcelArgument(Description = "Object name")] string ObjectName, [ExcelArgument(Description = "Curve name")] object CurveName, @@ -93,7 +93,7 @@ public class IRCurveFunctions }); } - [ExcelFunction(Description = "Creates a discount curve", Category = CategoryNames.Curves, Name = CategoryNames.Curves + "_" + nameof(CreateDiscountCurveFromDFs), IsThreadSafe = true)] + [ExcelFunction(Description = "Creates a discount curve", Category = CategoryNames.Curves, Name = CategoryNames.Curves + "_" + nameof(CreateDiscountCurveFromDFs))] public static object CreateDiscountCurveFromDFs( [ExcelArgument(Description = "Object name")] string ObjectName, [ExcelArgument(Description = "Curve name")] object CurveName, @@ -141,7 +141,7 @@ public class IRCurveFunctions }); } - [ExcelFunction(Description = "Gets a discount factor from a curve", Category = CategoryNames.Curves, Name = CategoryNames.Curves + "_" + nameof(GetDF), IsThreadSafe = true)] + [ExcelFunction(Description = "Gets a discount factor from a curve", Category = CategoryNames.Curves, Name = CategoryNames.Curves + "_" + nameof(GetDF))] public static object GetDF( [ExcelArgument(Description = "Curve object name")] string ObjectName, [ExcelArgument(Description = "Discount factor start date")] DateTime StartDate, @@ -158,7 +158,7 @@ public class IRCurveFunctions }); } - [ExcelFunction(Description = "Gets a forward rate from a curve", Category = CategoryNames.Curves, Name = CategoryNames.Curves + "_" + nameof(GetForwardRate), IsThreadSafe = true)] + [ExcelFunction(Description = "Gets a forward rate from a curve", Category = CategoryNames.Curves, Name = CategoryNames.Curves + "_" + nameof(GetForwardRate))] public static object GetForwardRate( [ExcelArgument(Description = "Curve object name")] string ObjectName, [ExcelArgument(Description = "Rate start date")] DateTime StartDate, @@ -192,7 +192,7 @@ public class IRCurveFunctions }); } - [ExcelFunction(Description = "Gets a forward fx rate from a funding model", Category = CategoryNames.Curves, Name = CategoryNames.Curves + "_" + nameof(GetForwardFxRate), IsThreadSafe = true)] + [ExcelFunction(Description = "Gets a forward fx rate from a funding model", Category = CategoryNames.Curves, Name = CategoryNames.Curves + "_" + nameof(GetForwardFxRate))] public static object GetForwardFxRate( [ExcelArgument(Description = "Funding model object name")] string ObjectName, [ExcelArgument(Description = "Settlement date")] DateTime SettleDate, @@ -210,7 +210,7 @@ public class IRCurveFunctions }); } - [ExcelFunction(Description = "Creates and calibrates a funding model to a funding instrument collection", Category = CategoryNames.Curves, Name = CategoryNames.Curves + "_" + nameof(CreateFundingModel), IsThreadSafe = true)] + [ExcelFunction(Description = "Creates and calibrates a funding model to a funding instrument collection", Category = CategoryNames.Curves, Name = CategoryNames.Curves + "_" + nameof(CreateFundingModel))] public static object CreateFundingModel( [ExcelArgument(Description = "Funding model name")] string ObjectName, [ExcelArgument(Description = "Build date")] DateTime BuildDate, @@ -226,7 +226,7 @@ public class IRCurveFunctions var emptyCurves = new Dictionary(); if (fic != null) { - emptyCurves = fic.Value.ImplyContainedCurves(BuildDate, Interpolator1DType.Linear); + emptyCurves = fic.Value.ImplyContainedCurves(BuildDate, Interpolator1DType.LinearFlatExtrap); if (!(SolveStages is ExcelMissing)) { var stageDict = ((object[,])SolveStages).RangeToDictionary(); @@ -274,7 +274,7 @@ public class IRCurveFunctions }); } - [ExcelFunction(Description = "Creates a funding model from one or more curves", Category = CategoryNames.Curves, Name = CategoryNames.Curves + "_" + nameof(CreateFundingModelFromCurves), IsThreadSafe = true)] + [ExcelFunction(Description = "Creates a funding model from one or more curves", Category = CategoryNames.Curves, Name = CategoryNames.Curves + "_" + nameof(CreateFundingModelFromCurves))] public static object CreateFundingModelFromCurves( [ExcelArgument(Description = "Output funding model")] string ObjectName, [ExcelArgument(Description = "Build date")] DateTime BuildDate, @@ -310,7 +310,7 @@ public class IRCurveFunctions }); } - [ExcelFunction(Description = "Creates a new funding model by combining two others", Category = CategoryNames.Curves, Name = CategoryNames.Curves + "_" + nameof(MergeFundingModels), IsThreadSafe = true)] + [ExcelFunction(Description = "Creates a new funding model by combining two others", Category = CategoryNames.Curves, Name = CategoryNames.Curves + "_" + nameof(MergeFundingModels))] public static object MergeFundingModels( [ExcelArgument(Description = "Output funding model")] string ObjectName, [ExcelArgument(Description = "Funding model A")] string FundingModelA, @@ -368,7 +368,7 @@ public class IRCurveFunctions }); } - [ExcelFunction(Description = "Lists curves in a funding model", Category = CategoryNames.Curves, Name = CategoryNames.Curves + "_" + nameof(ListCurvesInModel), IsThreadSafe = true)] + [ExcelFunction(Description = "Lists curves in a funding model", Category = CategoryNames.Curves, Name = CategoryNames.Curves + "_" + nameof(ListCurvesInModel))] public static object ListCurvesInModel( [ExcelArgument(Description = "Funding model name")] string FundingModelName) { @@ -381,7 +381,7 @@ public class IRCurveFunctions }); } - [ExcelFunction(Description = "Extracts a curve from a funding model", Category = CategoryNames.Curves, Name = CategoryNames.Curves + "_" + nameof(ExtractCurveFromModel), IsThreadSafe = true)] + [ExcelFunction(Description = "Extracts a curve from a funding model", Category = CategoryNames.Curves, Name = CategoryNames.Curves + "_" + nameof(ExtractCurveFromModel))] public static object ExtractCurveFromModel( [ExcelArgument(Description = "Funding model name")] string FundingModelName, [ExcelArgument(Description = "Curve name")] string CurveName, diff --git a/clients/Qwack.Excel/Curves/PriceCurveFunctions.cs b/clients/Qwack.Excel/Curves/PriceCurveFunctions.cs index 61fa1e6c..434e7bdb 100644 --- a/clients/Qwack.Excel/Curves/PriceCurveFunctions.cs +++ b/clients/Qwack.Excel/Curves/PriceCurveFunctions.cs @@ -25,7 +25,7 @@ public class PriceCurveFunctions { private static readonly ILogger _logger = ContainerStores.GlobalContainer.GetService()?.CreateLogger(); - [ExcelFunction(Description = "Creates a price curve", Category = CategoryNames.Curves, Name = CategoryNames.Curves + "_" + nameof(CreatePriceCurve), IsThreadSafe = true)] + [ExcelFunction(Description = "Creates a price curve", Category = CategoryNames.Curves, Name = CategoryNames.Curves + "_" + nameof(CreatePriceCurve))] public static object CreatePriceCurve( [ExcelArgument(Description = "Object name")] string ObjectName, [ExcelArgument(Description = "Asset Id")] string AssetId, @@ -75,7 +75,7 @@ public class PriceCurveFunctions }); } - [ExcelFunction(Description = "Creates a contango price curve for precious metals", Category = CategoryNames.Curves, Name = CategoryNames.Curves + "_" + nameof(CreateContangoPriceCurve), IsThreadSafe = true)] + [ExcelFunction(Description = "Creates a contango price curve for precious metals", Category = CategoryNames.Curves, Name = CategoryNames.Curves + "_" + nameof(CreateContangoPriceCurve))] public static object CreateContangoPriceCurve( [ExcelArgument(Description = "Object name")] string ObjectName, [ExcelArgument(Description = "Asset Id")] string AssetId, @@ -104,7 +104,7 @@ public class PriceCurveFunctions }); } - [ExcelFunction(Description = "Creates a sparse price curve", Category = CategoryNames.Curves, Name = CategoryNames.Curves + "_" + nameof(CreateSparsePriceCurve), IsThreadSafe = true)] + [ExcelFunction(Description = "Creates a sparse price curve", Category = CategoryNames.Curves, Name = CategoryNames.Curves + "_" + nameof(CreateSparsePriceCurve))] public static object CreateSparsePriceCurve( [ExcelArgument(Description = "Object name")] string ObjectName, [ExcelArgument(Description = "Asset Id")] string AssetId, @@ -131,7 +131,7 @@ public class PriceCurveFunctions }); } - [ExcelFunction(Description = "Creates a sparse price curve from swap objects", Category = CategoryNames.Curves, Name = CategoryNames.Curves + "_" + nameof(CreateSparsePriceCurveFromSwaps), IsThreadSafe = true)] + [ExcelFunction(Description = "Creates a sparse price curve from swap objects", Category = CategoryNames.Curves, Name = CategoryNames.Curves + "_" + nameof(CreateSparsePriceCurveFromSwaps))] public static object CreateSparsePriceCurveFromSwaps( [ExcelArgument(Description = "Object name")] string ObjectName, [ExcelArgument(Description = "Asset Id")] string AssetId, @@ -169,7 +169,7 @@ public class PriceCurveFunctions }); } - [ExcelFunction(Description = "Creates a price curve from basis swap objects", Category = CategoryNames.Curves, Name = CategoryNames.Curves + "_" + nameof(CreatePriceCurveFromBasisSwaps), IsThreadSafe = true)] + [ExcelFunction(Description = "Creates a price curve from basis swap objects", Category = CategoryNames.Curves, Name = CategoryNames.Curves + "_" + nameof(CreatePriceCurveFromBasisSwaps))] public static object CreatePriceCurveFromBasisSwaps( [ExcelArgument(Description = "Object name")] string ObjectName, [ExcelArgument(Description = "Asset Id")] string AssetId, @@ -216,7 +216,7 @@ public class PriceCurveFunctions }); } - [ExcelFunction(Description = "Creates a price curve from basis swap objects", Category = CategoryNames.Curves, Name = CategoryNames.Curves + "_" + nameof(CreateBasisPriceCurve), IsThreadSafe = true)] + [ExcelFunction(Description = "Creates a price curve from basis swap objects", Category = CategoryNames.Curves, Name = CategoryNames.Curves + "_" + nameof(CreateBasisPriceCurve))] public static object CreateBasisPriceCurve( [ExcelArgument(Description = "Object name")] string ObjectName, [ExcelArgument(Description = "Asset Id")] string AssetId, @@ -269,7 +269,7 @@ public class PriceCurveFunctions }); } - [ExcelFunction(Description = "Queries a price curve for a price for a give date", Category = CategoryNames.Curves, Name = CategoryNames.Curves + "_" + nameof(GetPrice), IsThreadSafe = true)] + [ExcelFunction(Description = "Queries a price curve for a price for a give date", Category = CategoryNames.Curves, Name = CategoryNames.Curves + "_" + nameof(GetPrice))] public static object GetPrice( [ExcelArgument(Description = "Object name")] string ObjectName, [ExcelArgument(Description = "Price date")] DateTime Date) @@ -285,7 +285,7 @@ public class PriceCurveFunctions }); } - [ExcelFunction(Description = "Queries a price curve for an average price for give dates", Category = CategoryNames.Curves, Name = CategoryNames.Curves + "_" + nameof(GetAveragePrice), IsThreadSafe = true)] + [ExcelFunction(Description = "Queries a price curve for an average price for give dates", Category = CategoryNames.Curves, Name = CategoryNames.Curves + "_" + nameof(GetAveragePrice))] public static object GetAveragePrice( [ExcelArgument(Description = "Object name")] string ObjectName, [ExcelArgument(Description = "Price dates")] double[] Dates) @@ -301,7 +301,7 @@ public class PriceCurveFunctions }); } - [ExcelFunction(Description = "Creates a new Asset-FX model", Category = CategoryNames.Curves, Name = CategoryNames.Curves + "_" + nameof(CreateAssetFxModel), IsThreadSafe = true)] + [ExcelFunction(Description = "Creates a new Asset-FX model", Category = CategoryNames.Curves, Name = CategoryNames.Curves + "_" + nameof(CreateAssetFxModel))] public static object CreateAssetFxModel( [ExcelArgument(Description = "Object name")] string ObjectName, [ExcelArgument(Description = "Build date")] DateTime BuildDate, @@ -337,7 +337,7 @@ public class PriceCurveFunctions }); } - [ExcelFunction(Description = "Creates a fixing dictionary", Category = CategoryNames.Curves, Name = CategoryNames.Curves + "_" + nameof(CreateFixingDictionary), IsThreadSafe = true)] + [ExcelFunction(Description = "Creates a fixing dictionary", Category = CategoryNames.Curves, Name = CategoryNames.Curves + "_" + nameof(CreateFixingDictionary))] public static object CreateFixingDictionary( [ExcelArgument(Description = "Object name")] string ObjectName, [ExcelArgument(Description = "Asset Id")] string AssetId, @@ -368,7 +368,7 @@ public class PriceCurveFunctions }); } - [ExcelFunction(Description = "Creates a fixing dictionary", Category = CategoryNames.Curves, Name = CategoryNames.Curves + "_" + nameof(CreateFixingDictionaryFromVectors), IsThreadSafe = true)] + [ExcelFunction(Description = "Creates a fixing dictionary", Category = CategoryNames.Curves, Name = CategoryNames.Curves + "_" + nameof(CreateFixingDictionaryFromVectors))] public static object CreateFixingDictionaryFromVectors( [ExcelArgument(Description = "Object name")] string ObjectName, [ExcelArgument(Description = "Asset Id")] string AssetId, @@ -403,7 +403,7 @@ public class PriceCurveFunctions }); } - [ExcelFunction(Description = "Creates a fixing dictionary for a rolling futures index", Category = CategoryNames.Curves, Name = CategoryNames.Curves + "_" + nameof(CreateFixingDictionaryForRollingFuture), IsThreadSafe = true)] + [ExcelFunction(Description = "Creates a fixing dictionary for a rolling futures index", Category = CategoryNames.Curves, Name = CategoryNames.Curves + "_" + nameof(CreateFixingDictionaryForRollingFuture))] public static object CreateFixingDictionaryForRollingFuture( [ExcelArgument(Description = "Object name")] string ObjectName, [ExcelArgument(Description = "Asset Id")] string AssetId, @@ -438,7 +438,7 @@ public class PriceCurveFunctions }); } - [ExcelFunction(Description = "Display contents of a fixing dictionary", Category = CategoryNames.Curves, Name = CategoryNames.Curves + "_" + nameof(DisplayFixingDictionary), IsThreadSafe = true)] + [ExcelFunction(Description = "Display contents of a fixing dictionary", Category = CategoryNames.Curves, Name = CategoryNames.Curves + "_" + nameof(DisplayFixingDictionary))] public static object DisplayFixingDictionary( [ExcelArgument(Description = "Object name")] string ObjectName, [ExcelArgument(Description = "Optional - fixing date")] object FixingDate, @@ -481,7 +481,7 @@ public class PriceCurveFunctions }); } - [ExcelFunction(Description = "Creates a correlation matrix", Category = CategoryNames.Curves, Name = CategoryNames.Curves + "_" + nameof(CreateCorrelationMatrix), IsThreadSafe = true)] + [ExcelFunction(Description = "Creates a correlation matrix", Category = CategoryNames.Curves, Name = CategoryNames.Curves + "_" + nameof(CreateCorrelationMatrix))] public static object CreateCorrelationMatrix( [ExcelArgument(Description = "Object name")] string ObjectName, [ExcelArgument(Description = "Labels X")] object[] LabelsX, @@ -496,7 +496,7 @@ public class PriceCurveFunctions } - [ExcelFunction(Description = "Creates a correlation matrix/time vector", Category = CategoryNames.Curves, Name = CategoryNames.Curves + "_" + nameof(CreateCorrelationTimeVecvtor), IsThreadSafe = true)] + [ExcelFunction(Description = "Creates a correlation matrix/time vector", Category = CategoryNames.Curves, Name = CategoryNames.Curves + "_" + nameof(CreateCorrelationTimeVecvtor))] public static object CreateCorrelationTimeVecvtor( [ExcelArgument(Description = "Object name")] string ObjectName, [ExcelArgument(Description = "Label A")] string LabelA, @@ -515,7 +515,7 @@ public class PriceCurveFunctions }); } - [ExcelFunction(Description = "Bends a spread curve to a sparse set of updated spreads", Category = CategoryNames.Curves, Name = CategoryNames.Curves + "_" + nameof(BendCurve), IsThreadSafe = true)] + [ExcelFunction(Description = "Bends a spread curve to a sparse set of updated spreads", Category = CategoryNames.Curves, Name = CategoryNames.Curves + "_" + nameof(BendCurve))] public static object BendCurve( [ExcelArgument(Description = "Input spreads")] double[] InputSpreads, [ExcelArgument(Description = "Sparse new spreads")] object[] SparseNewSpreads) diff --git a/clients/Qwack.Excel/Dates/BusinessDateFunctions.cs b/clients/Qwack.Excel/Dates/BusinessDateFunctions.cs index 81ba493f..9e6983e1 100644 --- a/clients/Qwack.Excel/Dates/BusinessDateFunctions.cs +++ b/clients/Qwack.Excel/Dates/BusinessDateFunctions.cs @@ -305,7 +305,7 @@ public static object QDates_ListCalendars() }); } - [ExcelFunction(Description = "Returns dates for Good Friday and Easter Monday in the given year", Category = "QDates", IsThreadSafe = true)] + [ExcelFunction(Description = "Returns dates for Good Friday and Easter Monday in the given year", Category = "QDates")] public static object QDates_Easter( [ExcelArgument(Description = "Date")] DateTime Date) { @@ -316,7 +316,7 @@ public static object QDates_ListCalendars() }); } - [ExcelFunction(Description = "Lists holidays for a calendar between two dates", Category = "QDates", IsThreadSafe = true)] + [ExcelFunction(Description = "Lists holidays for a calendar between two dates", Category = "QDates")] public static object QDates_ListHolidays( [ExcelArgument(Description = "Start Date")] DateTime StartDate, [ExcelArgument(Description = "End Date")] DateTime EndDate, diff --git a/clients/Qwack.Excel/Dates/FuturesFunctions.cs b/clients/Qwack.Excel/Dates/FuturesFunctions.cs index f9fc3e5f..cdde6370 100644 --- a/clients/Qwack.Excel/Dates/FuturesFunctions.cs +++ b/clients/Qwack.Excel/Dates/FuturesFunctions.cs @@ -29,7 +29,7 @@ public class FuturesFunctions }); } - [ExcelFunction(Description = "Returns roll date for a given futures code", Category = CategoryNames.Dates, Name = CategoryNames.Dates + "_" + nameof(FuturesRollFromCode), IsThreadSafe = true)] + [ExcelFunction(Description = "Returns roll date for a given futures code", Category = CategoryNames.Dates, Name = CategoryNames.Dates + "_" + nameof(FuturesRollFromCode))] public static object FuturesRollFromCode( [ExcelArgument(Description = "Futures code, e.g. CLZ3")] string FuturesCode) { @@ -41,7 +41,7 @@ public class FuturesFunctions }); } - [ExcelFunction(Description = "Returns front month code for a given futures root and value date", Category = CategoryNames.Dates, Name = CategoryNames.Dates + "_" + nameof(FuturesGetFrontMonth), IsThreadSafe = true)] + [ExcelFunction(Description = "Returns front month code for a given futures root and value date", Category = CategoryNames.Dates, Name = CategoryNames.Dates + "_" + nameof(FuturesGetFrontMonth))] public static object FuturesGetFrontMonth( [ExcelArgument(Description = "Value date")] DateTime ValueDate, [ExcelArgument(Description = "Futures code root, e.g. CL")] string FuturesCodeRoot, @@ -57,7 +57,7 @@ public class FuturesFunctions }); } - [ExcelFunction(Description = "Returns next code in expiry sequence from a given code", Category = CategoryNames.Dates, Name = CategoryNames.Dates + "_" + nameof(FuturesNextCode), IsThreadSafe = true)] + [ExcelFunction(Description = "Returns next code in expiry sequence from a given code", Category = CategoryNames.Dates, Name = CategoryNames.Dates + "_" + nameof(FuturesNextCode))] public static object FuturesNextCode( [ExcelArgument(Description = "Futures code, e.g. CLZ3")] string FuturesCode) { @@ -69,7 +69,7 @@ public class FuturesFunctions }); } - [ExcelFunction(Description = "Returns previous code in expiry sequence from a given code", Category = CategoryNames.Dates, Name = CategoryNames.Dates + "_" + nameof(FuturesPreviousCode), IsThreadSafe = true)] + [ExcelFunction(Description = "Returns previous code in expiry sequence from a given code", Category = CategoryNames.Dates, Name = CategoryNames.Dates + "_" + nameof(FuturesPreviousCode))] public static object FuturesPreviousCode( [ExcelArgument(Description = "Futures code, e.g. CLZ3")] string FuturesCode) { @@ -81,7 +81,7 @@ public class FuturesFunctions }); } - [ExcelFunction(Description = "Generates next LME curve date", Category = CategoryNames.Dates, Name = CategoryNames.Dates + "_" + nameof(NextLMECurveDate), IsThreadSafe = true)] + [ExcelFunction(Description = "Generates next LME curve date", Category = CategoryNames.Dates, Name = CategoryNames.Dates + "_" + nameof(NextLMECurveDate))] public static object NextLMECurveDate( [ExcelArgument(Description = "Previous date")] DateTime PrevDate, [ExcelArgument(Description = "3m date")] DateTime ThreeMonthDate, @@ -123,7 +123,7 @@ public class FuturesFunctions }); } - [ExcelFunction(Description = "Generates LME 3m date", Category = CategoryNames.Dates, Name = CategoryNames.Dates + "_" + nameof(GetLME3mDate), IsThreadSafe = true)] + [ExcelFunction(Description = "Generates LME 3m date", Category = CategoryNames.Dates, Name = CategoryNames.Dates + "_" + nameof(GetLME3mDate))] public static object GetLME3mDate( [ExcelArgument(Description = "Value date")] DateTime ValueDate) { @@ -139,7 +139,7 @@ public class FuturesFunctions }); } - [ExcelFunction(Description = "Gets month code and year for a given date", Category = CategoryNames.Dates, Name = CategoryNames.Dates + "_" + nameof(GetMonthCodeAndYear), IsThreadSafe = true)] + [ExcelFunction(Description = "Gets month code and year for a given date", Category = CategoryNames.Dates, Name = CategoryNames.Dates + "_" + nameof(GetMonthCodeAndYear))] public static object GetMonthCodeAndYear( [ExcelArgument(Description = "Value date")] DateTime ValueDate, [ExcelArgument(Description = "Number of year digits - 1,2 or 4")] int NumYearDigits) diff --git a/clients/Qwack.Excel/Instruments/FundingInstrumentFunctions.cs b/clients/Qwack.Excel/Instruments/FundingInstrumentFunctions.cs index e3c2e6d1..bcea8395 100644 --- a/clients/Qwack.Excel/Instruments/FundingInstrumentFunctions.cs +++ b/clients/Qwack.Excel/Instruments/FundingInstrumentFunctions.cs @@ -21,7 +21,7 @@ public class FundingInstrumentFunctions private static readonly ILogger _logger = ContainerStores.GlobalContainer.GetService()?.CreateLogger(); - [ExcelFunction(Description = "Creates a FRA object", Category = CategoryNames.Instruments, Name = CategoryNames.Instruments + "_" + nameof(CreateFRA), IsThreadSafe = true)] + [ExcelFunction(Description = "Creates a FRA object", Category = CategoryNames.Instruments, Name = CategoryNames.Instruments + "_" + nameof(CreateFRA))] public static object CreateFRA( [ExcelArgument(Description = "Object name")] string ObjectName, [ExcelArgument(Description = "Value date")] DateTime ValDate, @@ -70,7 +70,7 @@ public class FundingInstrumentFunctions }); } - [ExcelFunction(Description = "Creates an fx forward object", Category = CategoryNames.Instruments, Name = CategoryNames.Instruments + "_" + nameof(CreateFxForward), IsThreadSafe = true)] + [ExcelFunction(Description = "Creates an fx forward object", Category = CategoryNames.Instruments, Name = CategoryNames.Instruments + "_" + nameof(CreateFxForward))] public static object CreateFxForward( [ExcelArgument(Description = "Object name")] string ObjectName, [ExcelArgument(Description = "Settle Date")] DateTime SettleDate, @@ -107,7 +107,7 @@ public class FundingInstrumentFunctions }); } - [ExcelFunction(Description = "Creates a standard interest rate swap object following conventions for the given rate index", Category = CategoryNames.Instruments, Name = CategoryNames.Instruments + "_" + nameof(CreateIRS), IsThreadSafe = true)] + [ExcelFunction(Description = "Creates a standard interest rate swap object following conventions for the given rate index", Category = CategoryNames.Instruments, Name = CategoryNames.Instruments + "_" + nameof(CreateIRS))] public static object CreateIRS( [ExcelArgument(Description = "Object name")] string ObjectName, [ExcelArgument(Description = "Value date")] DateTime ValDate, @@ -150,7 +150,7 @@ public class FundingInstrumentFunctions }); } - [ExcelFunction(Description = "Creates a floating rate deposit following conventions for the given rate index", Category = CategoryNames.Instruments, Name = CategoryNames.Instruments + "_" + nameof(CreateFloatingDepo), IsThreadSafe = true)] + [ExcelFunction(Description = "Creates a floating rate deposit following conventions for the given rate index", Category = CategoryNames.Instruments, Name = CategoryNames.Instruments + "_" + nameof(CreateFloatingDepo))] public static object CreateFloatingDepo( [ExcelArgument(Description = "Object name")] string ObjectName, [ExcelArgument(Description = "Start date")] DateTime StartDate, @@ -192,7 +192,7 @@ public class FundingInstrumentFunctions }); } - [ExcelFunction(Description = "Creates a short-term interest rate future object from a futures code", Category = CategoryNames.Instruments, Name = CategoryNames.Instruments + "_" + nameof(CreateSTIRFromCode), IsThreadSafe = true)] + [ExcelFunction(Description = "Creates a short-term interest rate future object from a futures code", Category = CategoryNames.Instruments, Name = CategoryNames.Instruments + "_" + nameof(CreateSTIRFromCode))] public static object CreateSTIRFromCode( [ExcelArgument(Description = "Object name")] string ObjectName, [ExcelArgument(Description = "Value date")] DateTime ValDate, @@ -239,7 +239,7 @@ public class FundingInstrumentFunctions }); } - [ExcelFunction(Description = "Creates a compounded overnight interest rate future object from a futures code", Category = CategoryNames.Instruments, Name = CategoryNames.Instruments + "_" + nameof(CreateOISFutureFromCode), IsThreadSafe = true)] + [ExcelFunction(Description = "Creates a compounded overnight interest rate future object from a futures code", Category = CategoryNames.Instruments, Name = CategoryNames.Instruments + "_" + nameof(CreateOISFutureFromCode))] public static object CreateOISFutureFromCode( [ExcelArgument(Description = "Object name")] string ObjectName, [ExcelArgument(Description = "Value date")] DateTime ValDate, @@ -285,7 +285,7 @@ public class FundingInstrumentFunctions }); } - [ExcelFunction(Description = "Creates an interest rate basis swap object following conventions for the given rate index", Category = CategoryNames.Instruments, Name = CategoryNames.Instruments + "_" + nameof(CreateIRBasisSwap), IsThreadSafe = true)] + [ExcelFunction(Description = "Creates an interest rate basis swap object following conventions for the given rate index", Category = CategoryNames.Instruments, Name = CategoryNames.Instruments + "_" + nameof(CreateIRBasisSwap))] public static object CreateIRBasisSwap( [ExcelArgument(Description = "Object name")] string ObjectName, [ExcelArgument(Description = "Value date")] DateTime ValDate, @@ -329,7 +329,7 @@ public class FundingInstrumentFunctions }); } - [ExcelFunction(Description = "Creates a fixed-rate loan/depo object", Category = CategoryNames.Instruments, Name = CategoryNames.Instruments + "_" + nameof(CreateFixedRateLoanDepo), IsThreadSafe = true)] + [ExcelFunction(Description = "Creates a fixed-rate loan/depo object", Category = CategoryNames.Instruments, Name = CategoryNames.Instruments + "_" + nameof(CreateFixedRateLoanDepo))] public static object CreateFixedRateLoanDepo( [ExcelArgument(Description = "Object name")] string ObjectName, [ExcelArgument(Description = "Start date")] DateTime StartDate, @@ -359,7 +359,7 @@ public class FundingInstrumentFunctions }); } - [ExcelFunction(Description = "Creates a metal contango swap", Category = CategoryNames.Instruments, Name = CategoryNames.Instruments + "_" + nameof(CreateContangoSwap), IsThreadSafe = true)] + [ExcelFunction(Description = "Creates a metal contango swap", Category = CategoryNames.Instruments, Name = CategoryNames.Instruments + "_" + nameof(CreateContangoSwap))] public static object CreateContangoSwap( [ExcelArgument(Description = "Object name")] string ObjectName, [ExcelArgument(Description = "Spot Date")] DateTime SpotDate, @@ -396,7 +396,7 @@ public class FundingInstrumentFunctions }); } - [ExcelFunction(Description = "Creates a collection of funding instruments to calibrate a curve engine", Category = CategoryNames.Instruments, Name = CategoryNames.Instruments + "_" + nameof(CreateFundingInstrumentCollection), IsThreadSafe = true)] + [ExcelFunction(Description = "Creates a collection of funding instruments to calibrate a curve engine", Category = CategoryNames.Instruments, Name = CategoryNames.Instruments + "_" + nameof(CreateFundingInstrumentCollection))] public static object CreateFundingInstrumentCollection( [ExcelArgument(Description = "Object name")] string ObjectName, [ExcelArgument(Description = "Instruments")] object[] InstrumentsA, @@ -454,7 +454,7 @@ public class FundingInstrumentFunctions }); } - [ExcelFunction(Description = "Implies solve stages from a Funding Instrument Collection", Category = CategoryNames.Instruments, Name = CategoryNames.Instruments + "_" + nameof(ImplySolveStages), IsThreadSafe = true)] + [ExcelFunction(Description = "Implies solve stages from a Funding Instrument Collection", Category = CategoryNames.Instruments, Name = CategoryNames.Instruments + "_" + nameof(ImplySolveStages))] public static object ImplySolveStages( [ExcelArgument(Description = "Funding Instrument Collection Name")] string FICName, [ExcelArgument(Description = "Fx Matrix Name")] string FxMatrixName) @@ -470,7 +470,7 @@ public class FundingInstrumentFunctions }); } - [ExcelFunction(Description = "Creates a new rate index object", Category = CategoryNames.Instruments, Name = CategoryNames.Instruments + "_" + nameof(CreateRateIndex), IsThreadSafe = true, IsVolatile = true)] + [ExcelFunction(Description = "Creates a new rate index object", Category = CategoryNames.Instruments, Name = CategoryNames.Instruments + "_" + nameof(CreateRateIndex), IsVolatile = true)] public static object CreateRateIndex( [ExcelArgument(Description = "Index name")] string IndexName, [ExcelArgument(Description = "Currency")] string Currency, @@ -517,7 +517,7 @@ public class FundingInstrumentFunctions }); } - [ExcelFunction(Description = "Creates a new fx spot rate matrix", Category = CategoryNames.Instruments, Name = CategoryNames.Instruments + "_" + nameof(CreateFxMatrix), IsThreadSafe = true)] + [ExcelFunction(Description = "Creates a new fx spot rate matrix", Category = CategoryNames.Instruments, Name = CategoryNames.Instruments + "_" + nameof(CreateFxMatrix))] public static object CreateFxMatrix( [ExcelArgument(Description = "Fx matrix name")] string ObjectName, [ExcelArgument(Description = "Base currency")] string BaseCurrency, @@ -550,7 +550,7 @@ public class FundingInstrumentFunctions }); } - [ExcelFunction(Description = "Creates a new fx pair definition", Category = CategoryNames.Instruments, Name = CategoryNames.Instruments + "_" + nameof(CreateFxPair), IsThreadSafe = true)] + [ExcelFunction(Description = "Creates a new fx pair definition", Category = CategoryNames.Instruments, Name = CategoryNames.Instruments + "_" + nameof(CreateFxPair))] public static object CreateFxPair( [ExcelArgument(Description = "Fx pair name")] string ObjectName, [ExcelArgument(Description = "Domestic currency")] string DomesticCurrency, diff --git a/clients/Qwack.Excel/Instruments/InstrumentFunctions.cs b/clients/Qwack.Excel/Instruments/InstrumentFunctions.cs index 22513caa..476fd205 100644 --- a/clients/Qwack.Excel/Instruments/InstrumentFunctions.cs +++ b/clients/Qwack.Excel/Instruments/InstrumentFunctions.cs @@ -25,7 +25,7 @@ public class InstrumentFunctions { private static readonly ILogger _logger = ContainerStores.GlobalContainer.GetService()?.CreateLogger(); - [ExcelFunction(Description = "Creates an asian swap, term settled / single period", Category = CategoryNames.Instruments, Name = CategoryNames.Instruments + "_" + nameof(CreateAsianSwap), IsThreadSafe = true)] + [ExcelFunction(Description = "Creates an asian swap, term settled / single period", Category = CategoryNames.Instruments, Name = CategoryNames.Instruments + "_" + nameof(CreateAsianSwap))] public static object CreateAsianSwap( [ExcelArgument(Description = "Object name")] string ObjectName, [ExcelArgument(Description = "Period code or dates")] object PeriodCodeOrDates, @@ -90,7 +90,7 @@ public class InstrumentFunctions }); } - [ExcelFunction(Description = "Creates an asian crack/diff swap, term settled / single period", Category = CategoryNames.Instruments, Name = CategoryNames.Instruments + "_" + nameof(CreateAsianCrackDiffSwap), IsThreadSafe = true)] + [ExcelFunction(Description = "Creates an asian crack/diff swap, term settled / single period", Category = CategoryNames.Instruments, Name = CategoryNames.Instruments + "_" + nameof(CreateAsianCrackDiffSwap))] public static object CreateAsianCrackDiffSwap( [ExcelArgument(Description = "Object name")] string ObjectName, [ExcelArgument(Description = "Period code")] object PeriodCode, @@ -159,7 +159,7 @@ public class InstrumentFunctions }); } - [ExcelFunction(Description = "Creates a futures crack/diff swap, term settled / single period", Category = CategoryNames.Instruments, Name = CategoryNames.Instruments + "_" + nameof(CreateFutureCrackDiffSwap), IsThreadSafe = true)] + [ExcelFunction(Description = "Creates a futures crack/diff swap, term settled / single period", Category = CategoryNames.Instruments, Name = CategoryNames.Instruments + "_" + nameof(CreateFutureCrackDiffSwap))] public static object CreateFutureCrackDiffSwap( [ExcelArgument(Description = "Object name")] string ObjectName, [ExcelArgument(Description = "Pay future code")] string PayFuture, @@ -190,7 +190,7 @@ public class InstrumentFunctions }); } - [ExcelFunction(Description = "Creates a commodity future position", Category = CategoryNames.Instruments, Name = CategoryNames.Instruments + "_" + nameof(CreateFuture), IsThreadSafe = true)] + [ExcelFunction(Description = "Creates a commodity future position", Category = CategoryNames.Instruments, Name = CategoryNames.Instruments + "_" + nameof(CreateFuture))] public static object CreateFuture( [ExcelArgument(Description = "Object name")] string ObjectName, [ExcelArgument(Description = "Expiry date")] DateTime ExpiryDate, @@ -223,7 +223,7 @@ public class InstrumentFunctions }); } - [ExcelFunction(Description = "Creates a commodity futures option position", Category = CategoryNames.Instruments, Name = CategoryNames.Instruments + "_" + nameof(CreateFutureOption), IsThreadSafe = true)] + [ExcelFunction(Description = "Creates a commodity futures option position", Category = CategoryNames.Instruments, Name = CategoryNames.Instruments + "_" + nameof(CreateFutureOption))] public static object CreateFutureOption( [ExcelArgument(Description = "Object name")] string ObjectName, [ExcelArgument(Description = "Expiry date")] DateTime ExpiryDate, @@ -270,7 +270,7 @@ public class InstrumentFunctions }); } - [ExcelFunction(Description = "Creates a monthly-settled asian swap", Category = CategoryNames.Instruments, Name = CategoryNames.Instruments + "_" + nameof(CreateMonthlyAsianSwap), IsThreadSafe = true)] + [ExcelFunction(Description = "Creates a monthly-settled asian swap", Category = CategoryNames.Instruments, Name = CategoryNames.Instruments + "_" + nameof(CreateMonthlyAsianSwap))] public static object CreateMonthlyAsianSwap( [ExcelArgument(Description = "Object name")] string ObjectName, [ExcelArgument(Description = "Period code or dates")] object PeriodCodeOrDates, @@ -335,7 +335,7 @@ public class InstrumentFunctions }); } - [ExcelFunction(Description = "Creates an asian swap with custom pricing periods", Category = CategoryNames.Instruments, Name = CategoryNames.Instruments + "_" + nameof(CreateCustomAsianSwap), IsThreadSafe = true)] + [ExcelFunction(Description = "Creates an asian swap with custom pricing periods", Category = CategoryNames.Instruments, Name = CategoryNames.Instruments + "_" + nameof(CreateCustomAsianSwap))] public static object CreateCustomAsianSwap( [ExcelArgument(Description = "Object name")] string ObjectName, [ExcelArgument(Description = "Period dates")] object PeriodDates, @@ -413,7 +413,7 @@ public class InstrumentFunctions }); } - [ExcelFunction(Description = "Creates an asian option", Category = CategoryNames.Instruments, Name = CategoryNames.Instruments + "_" + nameof(CreateAsianOption), IsThreadSafe = true)] + [ExcelFunction(Description = "Creates an asian option", Category = CategoryNames.Instruments, Name = CategoryNames.Instruments + "_" + nameof(CreateAsianOption))] public static object CreateAsianOption( [ExcelArgument(Description = "Object name")] string ObjectName, [ExcelArgument(Description = "Period code")] object PeriodCodeOrDates, @@ -686,7 +686,7 @@ public class InstrumentFunctions }); } - [ExcelFunction(Description = "Creates a european option with a continuous american barrier", Category = CategoryNames.Instruments, Name = CategoryNames.Instruments + "_" + nameof(CreateAmericanBarrierOption), IsThreadSafe = true)] + [ExcelFunction(Description = "Creates a european option with a continuous american barrier", Category = CategoryNames.Instruments, Name = CategoryNames.Instruments + "_" + nameof(CreateAmericanBarrierOption))] public static object CreateAmericanBarrierOption( [ExcelArgument(Description = "Object name")] string ObjectName, [ExcelArgument(Description = "Asset Id")] string AssetId, @@ -758,7 +758,7 @@ public class InstrumentFunctions }); } - [ExcelFunction(Description = "Creates a one-touch/no-touch option with a continuous american barrier", Category = CategoryNames.Instruments, Name = CategoryNames.Instruments + "_" + nameof(CreateOneTouchOption), IsThreadSafe = true)] + [ExcelFunction(Description = "Creates a one-touch/no-touch option with a continuous american barrier", Category = CategoryNames.Instruments, Name = CategoryNames.Instruments + "_" + nameof(CreateOneTouchOption))] public static object CreateOneTouchOption( [ExcelArgument(Description = "Object name")] string ObjectName, [ExcelArgument(Description = "Asset Id")] string AssetId, @@ -820,7 +820,7 @@ public class InstrumentFunctions }); } - [ExcelFunction(Description = "Creates a double-no-touch option with a continuous american barrier", Category = CategoryNames.Instruments, Name = CategoryNames.Instruments + "_" + nameof(CreateDoubleNoTouchOption), IsThreadSafe = true)] + [ExcelFunction(Description = "Creates a double-no-touch option with a continuous american barrier", Category = CategoryNames.Instruments, Name = CategoryNames.Instruments + "_" + nameof(CreateDoubleNoTouchOption))] public static object CreateDoubleNoTouchOption( [ExcelArgument(Description = "Object name")] string ObjectName, [ExcelArgument(Description = "Asset Id")] string AssetId, @@ -877,7 +877,7 @@ public class InstrumentFunctions }); } - [ExcelFunction(Description = "Creates an european option", Category = CategoryNames.Instruments, Name = CategoryNames.Instruments + "_" + nameof(CreateEuropeanOption), IsThreadSafe = true)] + [ExcelFunction(Description = "Creates an european option", Category = CategoryNames.Instruments, Name = CategoryNames.Instruments + "_" + nameof(CreateEuropeanOption))] public static object CreateEuropeanOption( [ExcelArgument(Description = "Object name")] string ObjectName, [ExcelArgument(Description = "Expiry date")] DateTime ExpiryDate, @@ -933,7 +933,7 @@ public class InstrumentFunctions }); } - [ExcelFunction(Description = "Creates an european fx option", Category = CategoryNames.Instruments, Name = CategoryNames.Instruments + "_" + nameof(CreateEuropeanFxOption), IsThreadSafe = true)] + [ExcelFunction(Description = "Creates an european fx option", Category = CategoryNames.Instruments, Name = CategoryNames.Instruments + "_" + nameof(CreateEuropeanFxOption))] public static object CreateEuropeanFxOption( [ExcelArgument(Description = "Object name")] string ObjectName, [ExcelArgument(Description = "Expiry date")] DateTime ExpiryDate, @@ -983,7 +983,7 @@ public class InstrumentFunctions }); } - [ExcelFunction(Description = "Returns par rate of a trade given an AssetFx model", Category = CategoryNames.Instruments, Name = CategoryNames.Instruments + "_" + nameof(ProductParRate), IsThreadSafe = true)] + [ExcelFunction(Description = "Returns par rate of a trade given an AssetFx model", Category = CategoryNames.Instruments, Name = CategoryNames.Instruments + "_" + nameof(ProductParRate))] public static object ProductParRate( [ExcelArgument(Description = "Trade object name")] string TradeName, [ExcelArgument(Description = "Asset-FX model name")] string ModelName) @@ -1007,7 +1007,7 @@ public class InstrumentFunctions }); } - [ExcelFunction(Description = "Returns PV of a trade given an AssetFx model", Category = CategoryNames.Instruments, Name = CategoryNames.Instruments + "_" + nameof(ProductPV), IsThreadSafe = true)] + [ExcelFunction(Description = "Returns PV of a trade given an AssetFx model", Category = CategoryNames.Instruments, Name = CategoryNames.Instruments + "_" + nameof(ProductPV))] public static object ProductPV( [ExcelArgument(Description = "Trade object name")] string TradeName, [ExcelArgument(Description = "Asset-FX model name")] string ModelName, @@ -1036,7 +1036,7 @@ public class InstrumentFunctions }); } - [ExcelFunction(Description = "Returns PV of a portfolio given an AssetFx model", Category = CategoryNames.Instruments, Name = CategoryNames.Instruments + "_" + nameof(AssetPortfolioPV), IsThreadSafe = true)] + [ExcelFunction(Description = "Returns PV of a portfolio given an AssetFx model", Category = CategoryNames.Instruments, Name = CategoryNames.Instruments + "_" + nameof(AssetPortfolioPV))] public static object AssetPortfolioPV( [ExcelArgument(Description = "Result object name")] string ResultObjectName, [ExcelArgument(Description = "Portolio object name")] string PortfolioName, @@ -1060,7 +1060,7 @@ public class InstrumentFunctions }); } - [ExcelFunction(Description = "Returns expected cashflows of a portfolio given an AssetFx model", Category = CategoryNames.Instruments, Name = CategoryNames.Instruments + "_" + nameof(AssetPortfolioExpectedFlows), IsThreadSafe = true)] + [ExcelFunction(Description = "Returns expected cashflows of a portfolio given an AssetFx model", Category = CategoryNames.Instruments, Name = CategoryNames.Instruments + "_" + nameof(AssetPortfolioExpectedFlows))] public static object AssetPortfolioExpectedFlows( [ExcelArgument(Description = "Result object name")] string ResultObjectName, [ExcelArgument(Description = "Portolio object name")] string PortfolioName, @@ -1077,7 +1077,7 @@ public class InstrumentFunctions }); } - [ExcelFunction(Description = "Performs PnL attribution between two AssetFx models", Category = CategoryNames.Instruments, Name = CategoryNames.Instruments + "_" + nameof(AssetPnLAttribution), IsThreadSafe = true)] + [ExcelFunction(Description = "Performs PnL attribution between two AssetFx models", Category = CategoryNames.Instruments, Name = CategoryNames.Instruments + "_" + nameof(AssetPnLAttribution))] public static object AssetPnLAttribution( [ExcelArgument(Description = "Result object name")] string ResultObjectName, [ExcelArgument(Description = "Portolio object name")] string PortfolioName, @@ -1099,7 +1099,7 @@ public class InstrumentFunctions }); } - [ExcelFunction(Description = "Performs PnL attribution/explain between two AssetFx models", Category = CategoryNames.Instruments, Name = CategoryNames.Instruments + "_" + nameof(AssetPnLAttributionExplain), IsThreadSafe = true)] + [ExcelFunction(Description = "Performs PnL attribution/explain between two AssetFx models", Category = CategoryNames.Instruments, Name = CategoryNames.Instruments + "_" + nameof(AssetPnLAttributionExplain))] public static object AssetPnLAttributionExplain( [ExcelArgument(Description = "Result object name")] string ResultObjectName, [ExcelArgument(Description = "Portolio object name")] string PortfolioName, @@ -1124,7 +1124,7 @@ public class InstrumentFunctions }); } - [ExcelFunction(Description = "Performs PnL attribution/explain between two AssetFx models, computing activity PnL", Category = CategoryNames.Instruments, Name = CategoryNames.Instruments + "_" + nameof(AssetPnLAttributionExplainWithActivity), IsThreadSafe = true)] + [ExcelFunction(Description = "Performs PnL attribution/explain between two AssetFx models, computing activity PnL", Category = CategoryNames.Instruments, Name = CategoryNames.Instruments + "_" + nameof(AssetPnLAttributionExplainWithActivity))] public static object AssetPnLAttributionExplainWithActivity( [ExcelArgument(Description = "Result object name")] string ResultObjectName, [ExcelArgument(Description = "Starting portolio object name")] string PortfolioStartName, @@ -1150,7 +1150,7 @@ public class InstrumentFunctions }); } - [ExcelFunction(Description = "Creates a portfolio of instruments", Category = CategoryNames.Instruments, Name = CategoryNames.Instruments + "_" + nameof(CreatePortfolio), IsThreadSafe = true)] + [ExcelFunction(Description = "Creates a portfolio of instruments", Category = CategoryNames.Instruments, Name = CategoryNames.Instruments + "_" + nameof(CreatePortfolio))] public static object CreatePortfolio( [ExcelArgument(Description = "Object name")] string ObjectName, [ExcelArgument(Description = "Instruments")] object[,] Instruments) @@ -1165,7 +1165,7 @@ public class InstrumentFunctions }); } - [ExcelFunction(Description = "Returns a subset of trades from a portfolio object", Category = CategoryNames.Instruments, Name = CategoryNames.Instruments + "_" + nameof(FilterPortfolio), IsThreadSafe = true)] + [ExcelFunction(Description = "Returns a subset of trades from a portfolio object", Category = CategoryNames.Instruments, Name = CategoryNames.Instruments + "_" + nameof(FilterPortfolio))] public static object FilterPortfolio( [ExcelArgument(Description = "Output object name")] string ObjectName, [ExcelArgument(Description = "Input portfolio object name")] string PortfolioName, @@ -1192,7 +1192,7 @@ public class InstrumentFunctions }); } - [ExcelFunction(Description = "Returns a subset of trades from a portfolio object", Category = CategoryNames.Instruments, Name = CategoryNames.Instruments + "_" + nameof(FilterPortfolioByName), IsThreadSafe = true)] + [ExcelFunction(Description = "Returns a subset of trades from a portfolio object", Category = CategoryNames.Instruments, Name = CategoryNames.Instruments + "_" + nameof(FilterPortfolioByName))] public static object FilterPortfolioByName( [ExcelArgument(Description = "Output object name")] string ObjectName, [ExcelArgument(Description = "Input portfolio object name")] string PortfolioName, @@ -1216,7 +1216,7 @@ public class InstrumentFunctions }); } - [ExcelFunction(Description = "Returns a subset of trades from a portfolio object", Category = CategoryNames.Instruments, Name = CategoryNames.Instruments + "_" + nameof(FilterPortfolioByDate), IsThreadSafe = true)] + [ExcelFunction(Description = "Returns a subset of trades from a portfolio object", Category = CategoryNames.Instruments, Name = CategoryNames.Instruments + "_" + nameof(FilterPortfolioByDate))] public static object FilterPortfolioByDate( [ExcelArgument(Description = "Output object name")] string ObjectName, [ExcelArgument(Description = "Input portfolio object name")] string PortfolioName, @@ -1233,7 +1233,7 @@ public class InstrumentFunctions }); } - [ExcelFunction(Description = "Displays a portfolio of instruments", Category = CategoryNames.Instruments, Name = CategoryNames.Instruments + "_" + nameof(DisplayPortfolio), IsThreadSafe = true)] + [ExcelFunction(Description = "Displays a portfolio of instruments", Category = CategoryNames.Instruments, Name = CategoryNames.Instruments + "_" + nameof(DisplayPortfolio))] public static object DisplayPortfolio( [ExcelArgument(Description = "Object name")] string ObjectName) { diff --git a/clients/Qwack.Excel/Interpolation/InterpolatorFunctions.cs b/clients/Qwack.Excel/Interpolation/InterpolatorFunctions.cs index c5c1d72d..599f6d0b 100644 --- a/clients/Qwack.Excel/Interpolation/InterpolatorFunctions.cs +++ b/clients/Qwack.Excel/Interpolation/InterpolatorFunctions.cs @@ -16,7 +16,7 @@ public class InterpolatorFunctions { private static readonly ILogger _logger = ContainerStores.GlobalContainer.GetService()?.CreateLogger(); - [ExcelFunction(Description = "Creates a 1-dimensional interpolator", Category = CategoryNames.Interpolation, Name = CategoryNames.Interpolation + "_" + nameof(Create1dInterpolator), IsThreadSafe = true)] + [ExcelFunction(Description = "Creates a 1-dimensional interpolator", Category = CategoryNames.Interpolation, Name = CategoryNames.Interpolation + "_" + nameof(Create1dInterpolator))] public static object Create1dInterpolator( [ExcelArgument(Description = "Object name")] string ObjectName, [ExcelArgument(Description = "Array of X values")] double[] X, @@ -38,7 +38,7 @@ public class InterpolatorFunctions }); } - [ExcelFunction(Description = "Creates a 1-dimensional interpolator, tollerant of errors", Category = CategoryNames.Interpolation, Name = CategoryNames.Interpolation + "_" + nameof(Create1dInterpolatorSafe), IsThreadSafe = true)] + [ExcelFunction(Description = "Creates a 1-dimensional interpolator, tollerant of errors", Category = CategoryNames.Interpolation, Name = CategoryNames.Interpolation + "_" + nameof(Create1dInterpolatorSafe))] public static object Create1dInterpolatorSafe( [ExcelArgument(Description = "Object name")] string ObjectName, [ExcelArgument(Description = "Array of X values")] object[] X, @@ -75,7 +75,7 @@ public class InterpolatorFunctions }); } - [ExcelFunction(Description = "Creates a 2-dimensional interpolator", Category = CategoryNames.Interpolation, Name = CategoryNames.Interpolation + "_" + nameof(Create2dInterpolator), IsThreadSafe = true)] + [ExcelFunction(Description = "Creates a 2-dimensional interpolator", Category = CategoryNames.Interpolation, Name = CategoryNames.Interpolation + "_" + nameof(Create2dInterpolator))] public static object Create2dInterpolator( [ExcelArgument(Description = "Object name")] string ObjectName, [ExcelArgument(Description = "Array of X values")] double[] X, @@ -98,7 +98,7 @@ public class InterpolatorFunctions }); } - [ExcelFunction(Description = "Queries a 1-dimensional interpolator", Category = CategoryNames.Interpolation, Name = CategoryNames.Interpolation + "_" + nameof(Interpolate1d), IsThreadSafe = true)] + [ExcelFunction(Description = "Queries a 1-dimensional interpolator", Category = CategoryNames.Interpolation, Name = CategoryNames.Interpolation + "_" + nameof(Interpolate1d))] public static object Interpolate1d( [ExcelArgument(Description = "Object name")] string ObjectName, [ExcelArgument(Description = "X value to interpolate")] double X) @@ -110,7 +110,7 @@ public class InterpolatorFunctions }); } - [ExcelFunction(Description = "Queries a 2-dimensional interpolator", Category = CategoryNames.Interpolation, Name = CategoryNames.Interpolation + "_" + nameof(Interpolate2d), IsThreadSafe = true)] + [ExcelFunction(Description = "Queries a 2-dimensional interpolator", Category = CategoryNames.Interpolation, Name = CategoryNames.Interpolation + "_" + nameof(Interpolate2d))] public static object Interpolate2d( [ExcelArgument(Description = "Object name")] string ObjectName, [ExcelArgument(Description = "X value to interpolate")] double X, @@ -123,7 +123,7 @@ public class InterpolatorFunctions }); } - [ExcelFunction(Description = "Queries a 1-dimensional interpolator and returns average value", Category = CategoryNames.Interpolation, Name = CategoryNames.Interpolation + "_" + nameof(Interpolate1dAverage), IsThreadSafe = true)] + [ExcelFunction(Description = "Queries a 1-dimensional interpolator and returns average value", Category = CategoryNames.Interpolation, Name = CategoryNames.Interpolation + "_" + nameof(Interpolate1dAverage))] public static object Interpolate1dAverage( [ExcelArgument(Description = "Object name")] string ObjectName, [ExcelArgument(Description = "X values to interpolate")] double[] Xs) diff --git a/clients/Qwack.Excel/Models/ModelFunctions.cs b/clients/Qwack.Excel/Models/ModelFunctions.cs index c15ffaa8..562283ef 100644 --- a/clients/Qwack.Excel/Models/ModelFunctions.cs +++ b/clients/Qwack.Excel/Models/ModelFunctions.cs @@ -28,7 +28,7 @@ public class ModelFunctions private static readonly ILogger _logger = ContainerStores.GlobalContainer.GetService()?.CreateLogger(); - [ExcelFunction(Description = "Creates a monte-carlo settings object", Category = CategoryNames.Models, Name = CategoryNames.Models + "_" + nameof(CreateMcSettings), IsThreadSafe = true)] + [ExcelFunction(Description = "Creates a monte-carlo settings object", Category = CategoryNames.Models, Name = CategoryNames.Models + "_" + nameof(CreateMcSettings))] public static object CreateMcSettings( [ExcelArgument(Description = "Settings object name")] string ObjectName, [ExcelArgument(Description = "Number of paths")] int NumberOfPaths, @@ -81,7 +81,7 @@ public class ModelFunctions }); } - [ExcelFunction(Description = "Creates a credit settings object for monte-carlo", Category = CategoryNames.Models, Name = CategoryNames.Models + "_" + nameof(CreateCreditSettings), IsThreadSafe = true)] + [ExcelFunction(Description = "Creates a credit settings object for monte-carlo", Category = CategoryNames.Models, Name = CategoryNames.Models + "_" + nameof(CreateCreditSettings))] public static object CreateCreditSettings( [ExcelArgument(Description = "Credit settings object name")] string ObjectName, [ExcelArgument(Description = "Forward exposure dates for PFE etc")] object PFEDates, @@ -131,7 +131,7 @@ public class ModelFunctions }); } - [ExcelFunction(Description = "Creates a monte-carlo model precursor object", Category = CategoryNames.Models, Name = CategoryNames.Models + "_" + nameof(CreateMcModel), IsThreadSafe = true)] + [ExcelFunction(Description = "Creates a monte-carlo model precursor object", Category = CategoryNames.Models, Name = CategoryNames.Models + "_" + nameof(CreateMcModel))] public static object CreateMcModel( [ExcelArgument(Description = "Output object name")] string ObjectName, [ExcelArgument(Description = "Asset-FX vanilla model")]string VanillaModel, diff --git a/clients/Qwack.Excel/Options/VolSurfaceFunctions.cs b/clients/Qwack.Excel/Options/VolSurfaceFunctions.cs index 4d2f493e..3e9f3c0b 100644 --- a/clients/Qwack.Excel/Options/VolSurfaceFunctions.cs +++ b/clients/Qwack.Excel/Options/VolSurfaceFunctions.cs @@ -24,7 +24,7 @@ public class VolSurfaceFunctions { private static readonly ILogger _logger = ContainerStores.GlobalContainer.GetService()?.CreateLogger(); - [ExcelFunction(Description = "Creates a constant vol surface object", Category = CategoryNames.Volatility, Name = CategoryNames.Volatility + "_" + nameof(CreateConstantVolSurface), IsThreadSafe = true)] + [ExcelFunction(Description = "Creates a constant vol surface object", Category = CategoryNames.Volatility, Name = CategoryNames.Volatility + "_" + nameof(CreateConstantVolSurface))] public static object CreateConstantVolSurface( [ExcelArgument(Description = "Object name")] string ObjectName, [ExcelArgument(Description = "Asset Id")] string AssetId, @@ -47,7 +47,7 @@ public class VolSurfaceFunctions }); } - [ExcelFunction(Description = "Creates a grid vol surface object", Category = CategoryNames.Volatility, Name = CategoryNames.Volatility + "_" + nameof(CreateGridVolSurface), IsThreadSafe = true)] + [ExcelFunction(Description = "Creates a grid vol surface object", Category = CategoryNames.Volatility, Name = CategoryNames.Volatility + "_" + nameof(CreateGridVolSurface))] public static object CreateGridVolSurface( [ExcelArgument(Description = "Object name")] string ObjectName, [ExcelArgument(Description = "Asset Id")] string AssetId, @@ -105,7 +105,7 @@ public class VolSurfaceFunctions } - [ExcelFunction(Description = "Creates a grid vol surface object from RR/BF qoutes", Category = CategoryNames.Volatility, Name = CategoryNames.Volatility + "_" + nameof(CreateRiskyFlyVolSurface), IsThreadSafe = true)] + [ExcelFunction(Description = "Creates a grid vol surface object from RR/BF qoutes", Category = CategoryNames.Volatility, Name = CategoryNames.Volatility + "_" + nameof(CreateRiskyFlyVolSurface))] public static object CreateRiskyFlyVolSurface( [ExcelArgument(Description = "Object name")] string ObjectName, [ExcelArgument(Description = "Asset Id")] string AssetId, @@ -183,7 +183,7 @@ public class VolSurfaceFunctions }); } - [ExcelFunction(Description = "Creates a SABR vol surface object from RR/BF qoutes", Category = CategoryNames.Volatility, Name = CategoryNames.Volatility + "_" + nameof(CreateSABRVolSurfaceFromRiskyFly), IsThreadSafe = true)] + [ExcelFunction(Description = "Creates a SABR vol surface object from RR/BF qoutes", Category = CategoryNames.Volatility, Name = CategoryNames.Volatility + "_" + nameof(CreateSABRVolSurfaceFromRiskyFly))] public static object CreateSABRVolSurfaceFromRiskyFly( [ExcelArgument(Description = "Object name")] string ObjectName, [ExcelArgument(Description = "Asset Id")] string AssetId, @@ -251,7 +251,7 @@ public class VolSurfaceFunctions }); } - [ExcelFunction(Description = "Creates an inverse pair fx vol surface", Category = CategoryNames.Volatility, Name = CategoryNames.Volatility + "_" + nameof(CreateInvertedFxSurface), IsThreadSafe = true)] + [ExcelFunction(Description = "Creates an inverse pair fx vol surface", Category = CategoryNames.Volatility, Name = CategoryNames.Volatility + "_" + nameof(CreateInvertedFxSurface))] public static object CreateInvertedFxSurface( [ExcelArgument(Description = "Object name")] string ObjectName, [ExcelArgument(Description = "Input surface name")] string InputSurface) @@ -269,7 +269,7 @@ public class VolSurfaceFunctions }); } - [ExcelFunction(Description = "Gets a volatility for a delta strike from a vol surface object", Category = CategoryNames.Volatility, Name = CategoryNames.Volatility + "_" + nameof(GetVolForDeltaStrike), IsThreadSafe = true)] + [ExcelFunction(Description = "Gets a volatility for a delta strike from a vol surface object", Category = CategoryNames.Volatility, Name = CategoryNames.Volatility + "_" + nameof(GetVolForDeltaStrike))] public static object GetVolForDeltaStrike( [ExcelArgument(Description = "Object name")] string ObjectName, [ExcelArgument(Description = "Delta Strike")] double DeltaStrike, @@ -289,7 +289,7 @@ public class VolSurfaceFunctions }); } - [ExcelFunction(Description = "Gets a volatility for an absolute strike from a vol surface object", Category = CategoryNames.Volatility, Name = CategoryNames.Volatility + "_" + nameof(GetVolForAbsoluteStrike), IsThreadSafe = true)] + [ExcelFunction(Description = "Gets a volatility for an absolute strike from a vol surface object", Category = CategoryNames.Volatility, Name = CategoryNames.Volatility + "_" + nameof(GetVolForAbsoluteStrike))] public static object GetVolForAbsoluteStrike( [ExcelArgument(Description = "Object name")] string ObjectName, [ExcelArgument(Description = "Absolute Strike")] double Strike, @@ -309,7 +309,7 @@ public class VolSurfaceFunctions }); } - [ExcelFunction(Description = "Creates a CDF from a vol surface", Category = CategoryNames.Volatility, Name = CategoryNames.Volatility + "_" + nameof(GenerateCDF), IsThreadSafe = true)] + [ExcelFunction(Description = "Creates a CDF from a vol surface", Category = CategoryNames.Volatility, Name = CategoryNames.Volatility + "_" + nameof(GenerateCDF))] public static object GenerateCDF( [ExcelArgument(Description = "Output interpolator name")] string ObjectName, [ExcelArgument(Description = "Volsurface name")] string VolSurface, @@ -330,7 +330,7 @@ public class VolSurfaceFunctions }); } - [ExcelFunction(Description = "Creates a PDF from a vol surface", Category = CategoryNames.Volatility, Name = CategoryNames.Volatility + "_" + nameof(GeneratePDF), IsThreadSafe = true)] + [ExcelFunction(Description = "Creates a PDF from a vol surface", Category = CategoryNames.Volatility, Name = CategoryNames.Volatility + "_" + nameof(GeneratePDF))] public static object GeneratePDF( [ExcelArgument(Description = "Output interpolator name")] string ObjectName, [ExcelArgument(Description = "Volsurface name")] string VolSurface, @@ -351,7 +351,7 @@ public class VolSurfaceFunctions }); } - [ExcelFunction(Description = "Creates a PDF from a smile interpolator", Category = CategoryNames.Volatility, Name = CategoryNames.Volatility + "_" + nameof(GeneratePDFFromInterpolator), IsThreadSafe = true)] + [ExcelFunction(Description = "Creates a PDF from a smile interpolator", Category = CategoryNames.Volatility, Name = CategoryNames.Volatility + "_" + nameof(GeneratePDFFromInterpolator))] public static object GeneratePDFFromInterpolator( [ExcelArgument(Description = "Output interpolator name")] string ObjectName, [ExcelArgument(Description = "Input interpolator name")] string VolInterpolator, @@ -372,7 +372,7 @@ public class VolSurfaceFunctions }); } - [ExcelFunction(Description = "Creates a CDF from a smile interpolator", Category = CategoryNames.Volatility, Name = CategoryNames.Volatility + "_" + nameof(GenerateCDFFromInterpolator), IsThreadSafe = true)] + [ExcelFunction(Description = "Creates a CDF from a smile interpolator", Category = CategoryNames.Volatility, Name = CategoryNames.Volatility + "_" + nameof(GenerateCDFFromInterpolator))] public static object GenerateCDFFromInterpolator( [ExcelArgument(Description = "Output interpolator name")] string ObjectName, [ExcelArgument(Description = "Input interpolator name")] string VolInterpolator, @@ -393,7 +393,7 @@ public class VolSurfaceFunctions }); } - [ExcelFunction(Description = "Creates a composite smile from a vol surface and an fx vol surface", Category = CategoryNames.Volatility, Name = CategoryNames.Volatility + "_" + nameof(GenerateCompoSmile), IsThreadSafe = true)] + [ExcelFunction(Description = "Creates a composite smile from a vol surface and an fx vol surface", Category = CategoryNames.Volatility, Name = CategoryNames.Volatility + "_" + nameof(GenerateCompoSmile))] public static object GenerateCompoSmile( [ExcelArgument(Description = "Output interpolator name")] string ObjectName, [ExcelArgument(Description = "Volsurface name")] string VolSurface, @@ -422,7 +422,7 @@ public class VolSurfaceFunctions }); } - [ExcelFunction(Description = "Creates a composite surface from a vol surface and an fx vol surface", Category = CategoryNames.Volatility, Name = CategoryNames.Volatility + "_" + nameof(GenerateCompoSurface), IsThreadSafe = true)] + [ExcelFunction(Description = "Creates a composite surface from a vol surface and an fx vol surface", Category = CategoryNames.Volatility, Name = CategoryNames.Volatility + "_" + nameof(GenerateCompoSurface))] public static object GenerateCompoSurface( [ExcelArgument(Description = "Output surface name")] string ObjectName, [ExcelArgument(Description = "Asset-fx model name")] string AssetFxModel, @@ -448,7 +448,7 @@ public class VolSurfaceFunctions }); } - [ExcelFunction(Description = "Turns a risky/fly surface into a cube of quotes", Category = CategoryNames.Volatility, Name = CategoryNames.Volatility + "_" + nameof(SurfaceToCube), IsThreadSafe = true)] + [ExcelFunction(Description = "Turns a risky/fly surface into a cube of quotes", Category = CategoryNames.Volatility, Name = CategoryNames.Volatility + "_" + nameof(SurfaceToCube))] public static object SurfaceToCube( [ExcelArgument(Description = "Surface name")] string SurfaceName, [ExcelArgument(Description = "Output cube name")] string CubeName) @@ -462,7 +462,7 @@ public class VolSurfaceFunctions }); } - [ExcelFunction(Description = "Reconstructs a risky/fly surface from a cube of quotes", Category = CategoryNames.Volatility, Name = CategoryNames.Volatility + "_" + nameof(SurfaceFromCube), IsThreadSafe = true)] + [ExcelFunction(Description = "Reconstructs a risky/fly surface from a cube of quotes", Category = CategoryNames.Volatility, Name = CategoryNames.Volatility + "_" + nameof(SurfaceFromCube))] public static object SurfaceFromCube( [ExcelArgument(Description = "Output Surface name")] string SurfaceName, [ExcelArgument(Description = "Cube name")] string CubeName, @@ -493,7 +493,7 @@ public class VolSurfaceFunctions }); } - [ExcelFunction(Description = "Extracts quotes from a risky/fly surface", Category = CategoryNames.Volatility, Name = CategoryNames.Volatility + "_" + nameof(SurfaceToQuotes), IsThreadSafe = true)] + [ExcelFunction(Description = "Extracts quotes from a risky/fly surface", Category = CategoryNames.Volatility, Name = CategoryNames.Volatility + "_" + nameof(SurfaceToQuotes))] public static object SurfaceToQuotes( [ExcelArgument(Description = "Surface name")] string SurfaceName) { diff --git a/clients/Qwack.Excel/QwackDna.dna b/clients/Qwack.Excel/QwackDna.dna index 911c64a1..c1e32dc6 100644 --- a/clients/Qwack.Excel/QwackDna.dna +++ b/clients/Qwack.Excel/QwackDna.dna @@ -8,6 +8,10 @@