Lean icon indicating copy to clipboard operation
Lean copied to clipboard

Better input checking on Toolbox/Coarse Universe Generator CLI

Open superichmann opened this issue 3 years ago • 1 comments

Expected Behavior

The Coarse Universes should be created

Actual Behavior

An error "The provided properties do not match with a valid {nameof(SecurityType)}", "properties" occures. SecurityType = (SecurityType)ExtractFromProperties(SecurityTypeOffset, SecurityTypeWidth, properties); is returning a number ending with 17 instead of 1 which is not a valid SecurityType enum

Maybe its related to this line var otherData = putcall + days + style + strk + strikeScale + marketCode + (ulong)securityType; a very high number on days is causing problems? :o

Reproducing the Problem

Call toolbox.exe --app CUG and have a map file with two lines such as:

18920623,ge,N 20501231,ge,N

System Information

Windows 10 .NET 6

superichmann avatar Aug 12 '22 08:08 superichmann

1899-12-30 is the start of OADate; I think that would be the earliest supported date.

Bug here should be "Better input checking on CLI tools to give user feedback on input ranges."

jaredbroad avatar Aug 17 '22 15:08 jaredbroad