mirror of
https://github.com/microsoft/qlib.git
synced 2026-07-17 01:14:35 +08:00
move backtest to core, fix calendar bugs, add some docstring
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
import pandas as pd
|
||||
|
||||
|
||||
from ...backtest.profit_attribution import get_stock_weight_df
|
||||
from ....backtest.profit_attribution import get_stock_weight_df
|
||||
|
||||
|
||||
def parse_position(position: dict = None) -> pd.DataFrame:
|
||||
|
||||
@@ -97,7 +97,7 @@ def rank_label_graph(
|
||||
qcr.analysis_position.rank_label_graph(positions, features_df, pred_df_dates.min(), pred_df_dates.max())
|
||||
|
||||
|
||||
:param position: position data; **qlib.contrib.backtest.backtest.backtest** result.
|
||||
:param position: position data; **qlib.backtest.backtest** result.
|
||||
:param label_data: **D.features** result; index is **pd.MultiIndex**, index name is **[instrument, datetime]**; columns names is **[label]**.
|
||||
**The label T is the change from T to T+1**, it is recommended to use ``close``, example: `D.features(D.instruments('csi500'), ['Ref($close, -1)/$close-1'])`.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user