MapResolver.ResolveMapFile(ticker, date) should return null if we ask for a ticker delisted before date
Actual Behavior
It returns the last MapFile with the ticker
Potential Solution
Check the MapResolver.ResolveMapFile date logic.
Reproducing the Problem
This test should pass, but it fails in current master.
[Test]
public void ResolvesDelistedSymbolAsNull()
{
var mapResolver = new MapFileResolver(new List<MapFile>
{
new MapFile(
"amz",
new List<MapFileRow>
{
new MapFileRow(new DateTime(1998, 01, 02), "uwz"),
new MapFileRow(new DateTime(1998, 09, 11), "uwz"),
new MapFileRow(new DateTime(2004, 12, 31), "amz")
}
)
});
var date = new DateTime(2007, 01, 03);
var ticker = "AMZ";
Assert.IsNull(mapResolver.ResolveMapFile(ticker, date));
}
System Information
Windows
Checklist
[x] I have completely filled out this template
[x] I have confirmed that this issue exists on the current master branch
[x] I have confirmed that this is not a duplicate issue by searching issues
[x] I have provided detailed steps to reproduce the issue
Expected Behavior
MapResolver.ResolveMapFile(ticker, date)
should returnnull
if we ask for a ticker delisted beforedate
Actual Behavior
It returns the last
MapFile
with the tickerPotential Solution
Check the
MapResolver.ResolveMapFile
date logic.Reproducing the Problem
This test should pass, but it fails in current
master
.System Information
Windows
Checklist
master
branch