qlib icon indicating copy to clipboard operation
qlib copied to clipboard

Add PIT backend file storage

Open Chaoyingz opened this issue 2 years ago • 0 comments

🌟 Feature Description

Add PIT backend file storage, split the functions of P operator and PFeature, make PFeature work independently.

Motivation

  1. Improve readability of existing PIT-related code.
  2. Support to directly read the release date of the financial report.
  3. improve the performance of P operator.

Alternatives

PFeature finds data for the corresponding reporting period based on the incoming start time and end time quarter. The returned data looks like this:

>>> D.features(["sh600519"], ["$$roewa_q", "$$yoyni_q"], start_time="2018-01-01", end_time="2019-01-01")
                                             $$roewa_q     $$yoyni_q
        instrument period     datetime
        sh600519   201801     2018-04-28     1.305041      1.305434 
                   201802     2018-08-02     2.000000      2.305041
                   201803     2018-10-29     3.000000      3.305041
                   201804     2019-03-29     4.175322      4.252650
                   201901     2019-04-25     5.342443      5.343440

Additional Notes

Chaoyingz avatar Aug 01 '22 09:08 Chaoyingz