Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sync dev -> main #1661

Merged
merged 23 commits into from
Aug 13, 2023
Merged

sync dev -> main #1661

merged 23 commits into from
Aug 13, 2023

Conversation

DanielGoldfarb and others added 23 commits July 14, 2023 15:17
Adjust PEP 8 + minor improvement
Several improvements to price repair

Repair 100x and split errors:
- Handle stocks that recently suspended - use latest ACTIVE trading as baseline
- Improve error identification:
  - Restrict repair to no older than 1 year before oldest split
  - To reduce false positives when checking for multiday split errors,
    only analyse 'Open' and 'Close' and use average change instead of nearest-to-1
  - For weekly intervals reduce threshold to 3x standard deviation (5x was too high),
    and for monthly increase to 6x
  - For multiday intervas, if errors only detected in 1 column then assume false positive => ignore

Repair missing div-adjust:
- Fix repair of multiday intervals containing dividend

Price reconstruction:
- Move to after repairing 100x and split errors, so calibration works properly
- Fix maximum depth and reduce to 1
- Restrict calibration to 'Open' and 'Close', because 'Low' and 'High' can differ significantly between e.g. 1d and day-of-1h

Miscellaneous:
- Deprecate repair='silent', the logging module handles this
- Improve tests for 100x and split errors
- New test for 'repair missing div adjust'
Adjust PEP 8 + minor improvements + f-strings in base.py
PEP 8 changes + minor performance improvements
option_chain() return underlying data that comes with the options data
Improve bad-split-repair on multiday intervals
Switch some repair log msgs from warning -> info
Commit a4d7d6 introduced a circular import into utils.py
Price repair fixes and improvement

Fixes:
- fix reconstruction mis-calibration with tiny DataFrames
- fix detecting last-active-trading-interval when NaNs in DataFrame
- redesign mapping 100x signals to ranges:
  - no change for signals before last-active-trading-interval
  - but for signals after last-active-trading-interval, process in reverse order

Improvements:
- increase max reconstruction depth from 1 to 2. E.g. now 1wk can be repaired with 1h (1wk->1d->1h)
…libration

Fix price repair: 100x & calibration
@ValueRaider ValueRaider merged commit b6372c0 into main Aug 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants