。。。


(foreverhedge) #1
克隆策略
In [1]:
import pandas as pd
import numpy as np
from pandas import DataFrame
from pandas import Series
import matplotlib as mpl
import matplotlib.pyplot as plt
from datetime import datetime,date,timedelta
In [2]:
#获得从2005-01-01到2017-12-31的所有股票名称
share = D.instruments(start_date='2005-01-01', 
           end_date='2017-12-31', market='CN_STOCK_A')
In [4]:
date = D.trading_days(market='CN', start_date='2005-01-01', 
           end_date='2017-12-31')
In [6]:
date[1:10]
Out[6]:
date
3455 2005-01-05
3456 2005-01-06
3457 2005-01-07
3458 2005-01-10
3459 2005-01-11
3460 2005-01-12
3461 2005-01-13
3462 2005-01-14
3463 2005-01-17
In [ ]: