braverock / braverock/quantstrat
InitDate and StartDate
- Dominant language
- R
- Stars
- 310
- Forks
- 121
- PR merge metrics
- No merged PRs in 30d
Description
I have an issue when running a trading strategy where the indicator and signal function are positive from the beginning i.e. the indicator indicates that i should be Long, since the beginning of my dataset
However, when running apply strategy, it does not trade at all.
Here's what I did
1. I checked all other issues for this GitHub repo, but could not find a similar question.
2. I checked stack overflow for such quantstrat issues, but have not found one.
3. I ensure that initDate is one day earlier than the first date in my mktdata e.g. if my dataset starts at 2020-01-01, my initDate is 2019-12-31
I believe this issue does not need a minimum reproducible example, as it could be some undocumented update to the package.
But I'll provide one when needed.
Thanks
Contributor guide
Research direction
Start with the apply strategy call and compare InitDate, StartDate, and the first date in mktdata, using the reported case where the indicator and signal are positive from the beginning. Reproduce the missing trade behavior with a minimal strategy example, then confirm the expected initialization and entry behavior before documenting or correcting it.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- r
- Domain
- fintech-quant
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100