python ETF的QUANTOPIAN模板
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了python ETF的QUANTOPIAN模板相关的知识,希望对你有一定的参考价值。
# Create a static list of some random iShares ETFs
my_etfs = (StaticAssets(symbols([
'IVV', #iShares Core S&P 500 ETF
'EFA', #iShares MSCI EAFE ETF
'AGG', #iShares Core U.S. Aggregate Bond ETF
'IJH', #iShares Core S&P Mid-Cap ETF
'IWM', #iShares Russell 2000 ETF
'IWD', #iShares Russell 1000 Value ETF
'IWF', #iShares Russell 1000 Growth ETF
'LQD', #iShares iBoxx $ Investment Grade Corporate Bond ETF
'EEM', #iShares MSCI Emerging Markets ETF
'EZU', #'iShares MSCI Eurozone ETF
])))
# instantiate the Latest_10 factor
latest_price = Latest_Close(mask = my_etfs)
high = USEquityPricing.high.latest
low = USEquityPricing.low.latest
open_price = USEquityPricing.open.latest
close = USEquityPricing.close.latest
volume = USEquityPricing.volume.latest
# Create a pipline with each of the factor outputs as columns
pipe = Pipeline(
columns = {
'high' : high,
'low' : low,
'close' : close,
'open_price' : open_price,
'volume' : volume,
'latest_price' : latest_price,
},
screen = my_etfs
)
# Run the pipeline and show the results
results = run_pipeline(pipe, '2016-07-08', '2016-07-08')
results
以上是关于python ETF的QUANTOPIAN模板的主要内容,如果未能解决你的问题,请参考以下文章
python QUANTOPIAN MSMP 6.00
python QUANTOPIAN为战略建立因素
python QUANTOPIAN策略与管道因素
python RUN QUANTOPIAN(RESEARCH)PIPELINE
python QUANTOPIAN进口管道
python QUANTOPIAN PIPELINE STRATEGY