Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/cetusfinance/qwack
Browse files Browse the repository at this point in the history
  • Loading branch information
gavbrennan committed Sep 14, 2021
2 parents 7c4c1b4 + ea19ec0 commit 9b89cb4
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 8 deletions.
10 changes: 6 additions & 4 deletions clients/Qwack.CLI/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,13 @@ static void Main(string[] args)
var commandRows = new List<CommandFileRow>();
using var textReader = File.OpenText(FileName);
{
using var csv = new CsvReader(textReader);
var cfg = new CsvConfiguration(System.Globalization.CultureInfo.InvariantCulture)
{
csv.Configuration.HasHeaderRecord = false;
csv.Configuration.CultureInfo = System.Globalization.CultureInfo.InvariantCulture;
csv.Configuration.MissingFieldFound = null;
HasHeaderRecord = false,
MissingFieldFound = null
};
using var csv = new CsvReader(textReader, cfg);
{
commandRows = csv.GetRecords<CommandFileRow>().ToList();
}
}
Expand Down
2 changes: 1 addition & 1 deletion clients/Qwack.CLI/Qwack.CLI.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="CsvHelper" Version="12.2.2" />
<PackageReference Include="CsvHelper" Version="27.1.0" />
<PackageReference Include="Utility.CommandLine.Arguments" Version="4.0.0" />
</ItemGroup>

Expand Down
4 changes: 2 additions & 2 deletions clients/Qwack.Excel/Qwack.Excel.csproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\common.props" />
<PropertyGroup>
<TargetFramework>net471</TargetFramework>
Expand Down Expand Up @@ -37,7 +37,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="CsvHelper" Version="12.2.2" />
<PackageReference Include="CsvHelper" Version="27.1.0" />
<PackageReference Include="ExcelDna.AddIn" Version="1.5.0-rc1" />
<PackageReference Include="ExcelDna.Integration" Version="1.5.0-rc1" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="3.1.0" />
Expand Down
3 changes: 2 additions & 1 deletion test/Qwack.Models.Tests/PFETests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public void TurboPFETest()
var am = GetModel();
var swap = AssetProductFactory.CreateTermAsianSwap(valDate.AddDays(100), valDate.AddDays(100), assetPrice, "CL", null, valDate.AddDays(101), usd);
swap.DiscountCurve = "USD";

swap.TradeId = "BLAH";
var pfe = swap.QuickPFE(CI, am);

var t = am.BuildDate.CalculateYearFraction(swap.AverageEndDate, Transport.BasicTypes.DayCountBasis.Act365F);
Expand All @@ -70,6 +70,7 @@ public void QuickPFETest()
var am = GetModel();
var swap = AssetProductFactory.CreateTermAsianSwap(valDate.AddDays(100), valDate.AddDays(100), assetPrice, "CL", null, valDate.AddDays(101), usd);
swap.DiscountCurve = "USD";
swap.TradeId = "BLAH";
var pf = new Portfolio { Instruments = new List<IInstrument> { swap } };

var pfeCube = QuickPFECalculator.Calculate(am, pf, CI, usd, TestProviderHelper.CurrencyProvider, TestProviderHelper.CalendarProvider);
Expand Down

0 comments on commit 9b89cb4

Please sign in to comment.