17 using System.Globalization;
30 public DateTime
Date {
get; init; }
59 var line = csvLine.Split(
',');
62 if (!DateTime.TryParseExact(line[0],
DateFormat.
EightCharacter, CultureInfo.InvariantCulture, DateTimeStyles.None, out date))
64 Log.
Trace($
"Couldn't parse date/time while reading future margin requirement file. Line: {csvLine}");
67 decimal initialOvernight;
68 if (!decimal.TryParse(line[1], out initialOvernight))
70 Log.
Trace($
"Couldn't parse Initial Overnight margin requirements while reading future margin requirement file. Line: {csvLine}");
73 decimal maintenanceOvernight;
74 if (!decimal.TryParse(line[2], out maintenanceOvernight))
76 Log.
Trace($
"Couldn't parse Maintenance Overnight margin requirements while reading future margin requirement file. Line: {csvLine}");
80 decimal initialIntraday = initialOvernight * 0.4m;
82 && !decimal.TryParse(line[3], out initialIntraday))
84 Log.
Trace($
"Couldn't parse Initial Intraday margin requirements while reading future margin requirement file. Line: {csvLine}");
88 decimal maintenanceIntraday = maintenanceOvernight * 0.4m;
90 && !decimal.TryParse(line[4], out maintenanceIntraday))
92 Log.
Trace($
"Couldn't parse Maintenance Intraday margin requirements while reading future margin requirement file. Line: {csvLine}");