How to configure SelectHasData() ?
See original GitHub issueHello,
Some of my price series start with abnormal values and it causes backtest bias, data looks like this :
timestamp
2017-05-20 00:00:00+00:00 NaN
2017-05-21 00:00:00+00:00 NaN
2017-05-22 00:00:00+00:00 NaN
2017-05-23 00:00:00+00:00 100000.0 # abnormal value here
2017-05-24 00:00:00+00:00 00006.54
2017-05-25 00:00:00+00:00 00006.33
2017-05-26 00:00:00+00:00 00006.13
2017-05-27 00:00:00+00:00 00006.24
How can I configure SelectHasData()
to wait for at least 2 periods after NaN
? so that selection will starts the 2017-05-25.
I have tried SelectHasData(pd.DateOffset(days=2), min_count=2)
or just SelectHasData(pd.DateOffset(days=2)
but it doesn’t work as expected and I still have the same problem. What am’I missing here ?
Thank you,
Issue Analytics
- State:
- Created 5 years ago
- Comments:6
Top Results From Across the Web
The Fluent API HasData Method - Learn Entity Framework Core
When the HasData method is used, EF Core will automatically generate SET IDENTITY INSERT ON for the relevant table, and the set it...
Read more >Seeding data with .HasData() #12464 - dotnet/efcore - GitHub
HasData() method but this is what I am currently experiencing. I have the two basic classes created from the EFCore tutorial on Microsoft's...
Read more >Data Points - Deep Dive into EF Core HasData Seeding
A couple things to pay attention to here: First, I'm explicitly setting the key property, MagazineId. Second, I'm not supplying the Publisher string....
Read more >Entity Framework Core - Migration HasData method not ...
class Source { // Nullable to allow both using the DEFAULT and inserting SourceType.Email public SourceType? Type {get;set;} }.
Read more >Migrations and Seed Data With Entity Framework Core
NET Core Web API program and learn how to create a full ... This file has two methods conveniently named Up() and Down...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I have seen a few issues with
SelectHasData()
but what you are describing seems to work for me.Here is my algo
PrintSelector
is just printingtarget.now
andtarget.temp['selected']
.My data frame as NaN values on the first three dates (2007-05-07, 2007-05-08, 2007-05-09) and values from 2007-05-10 on. I expected to have tickers in
target.temp['selected']
on 2007-05-11, nothing before.My console shows:
So it is avoiding NaN’s entries + the first date. What I discovered running this little example is that on every subsequent Monday,
target.temp['selected']
is empty… This is clearly an issue. It should offset by business days or integer position to avoid the problem.Hope this helps.
The code looks indeed like what Jordan said.
Algo
is a class of the bt package.