实例介绍
开源ZipLine本身只支持美股,这是本地化了一下。。 通过本地股票数据接口,可以实现回测策略的编写和图形化输出, 需要有python下pandas和matplot等金融分析相应工具基础
【实例截图】
【核心代码】
zipline-chinese-version_1.1
└── zipline-chinese-version_1.1
├── appveyor.yml
├── AUTHORS
├── ci
│ ├── appveyor
│ │ ├── install.ps1
│ │ ├── run_with_env.cmd
│ │ └── vcvars64.bat
│ └── make_conda_packages.py
├── conda
│ ├── bcolz
│ │ ├── bld.bat
│ │ ├── build.sh
│ │ └── meta.yaml
│ ├── cyordereddict
│ │ ├── bld.bat
│ │ ├── build.sh
│ │ └── meta.yaml
│ ├── logbook
│ │ ├── bld.bat
│ │ ├── build.sh
│ │ └── meta.yaml
│ ├── numexpr
│ │ ├── bld.bat
│ │ ├── build.sh
│ │ └── meta.yaml
│ ├── README.md
│ ├── setuptools_scm
│ │ ├── bld.bat
│ │ ├── build.sh
│ │ └── meta.yaml
│ ├── ta-lib
│ │ ├── bld.bat
│ │ ├── build.sh
│ │ └── meta.yaml
│ └── zipline
│ ├── bld.bat
│ ├── build.sh
│ └── meta.yaml
├── docs
│ ├── CNAME
│ ├── deploy.py
│ ├── make.bat
│ ├── Makefile
│ ├── notebooks
│ │ └── tutorial.ipynb
│ └── source
│ ├── appendix.rst
│ ├── beginner-tutorial.rst
│ ├── conf.py
│ ├── dev-doc-message.txt
│ ├── index.rst
│ ├── install.rst
│ ├── release-process.rst
│ ├── releases.rst
│ ├── tutorial_files
│ │ ├── tutorial_11_2.png
│ │ └── tutorial_22_1.png
│ └── whatsnew
│ ├── 0.6.1.txt
│ ├── 0.7.0.txt
│ ├── 0.8.0.txt
│ ├── 0.8.3.txt
│ ├── 0.8.4.txt
│ ├── 0.9.0.txt
│ └── skeleton.txt
├── etc
│ ├── conda_build_matrix.py
│ ├── create_authors_file.sh
│ ├── git-hooks
│ │ └── pre-commit
│ ├── goodies.txt
│ ├── ordered_pip.sh
│ ├── requirements_blaze.txt
│ ├── requirements_dev.txt
│ ├── requirements_docs.txt
│ ├── requirements_talib.txt
│ └── requirements.txt
├── LICENSE
├── MANIFEST.in
├── README.rst
├── requirements.txt
├── scripts
│ ├── generate_new_sample_saved_state.py
│ └── run_algo.py
├── setup.cfg
├── setup.py
├── tests
│ ├── data
│ │ ├── __init__.py
│ │ ├── test_minute_bars.py
│ │ └── test_us_equity_pricing.py
│ ├── finance
│ │ ├── __init__.py
│ │ └── test_slippage.py
│ ├── history_cases.py
│ ├── __init__.py
│ ├── pipeline
│ │ ├── base.py
│ │ ├── __init__.py
│ │ ├── test_adjusted_array.py
│ │ ├── test_adjustment.py
│ │ ├── test_blaze.py
│ │ ├── test_buyback_auth.py
│ │ ├── test_classifier.py
│ │ ├── test_column.py
│ │ ├── test_dividends.py
│ │ ├── test_earnings.py
│ │ ├── test_engine.py
│ │ ├── test_events.py
│ │ ├── test_factor.py
│ │ ├── test_filter.py
│ │ ├── test_frameload.py
│ │ ├── test_numerical_expression.py
│ │ ├── test_pipeline_algo.py
│ │ ├── test_pipeline.py
│ │ ├── test_term.py
│ │ └── test_us_equity_pricing_loader.py
│ ├── resources
│ │ ├── pipeline_inputs
│ │ │ ├── AAPL.csv
│ │ │ ├── BRK-A.csv
│ │ │ ├── generate.py
│ │ │ └── MSFT.csv
│ │ └── saved_state_archive
│ │ ├── zipline.finance.blotter.Blotter
│ │ │ └── State_Version_1
│ │ ├── zipline.finance.blotter.Order
│ │ │ └── State_Version_1
│ │ ├── zipline.finance.commission.PerDollar
│ │ │ └── State_Version_1
│ │ ├── zipline.finance.commission.PerShare
│ │ │ └── State_Version_1
│ │ ├── zipline.finance.commission.PerTrade
│ │ │ └── State_Version_1
│ │ ├── zipline.finance.performance.period.PerformancePeriod
│ │ │ ├── State_Version_1
│ │ │ └── State_Version_2
│ │ ├── zipline.finance.performance.position.Position
│ │ │ └── State_Version_1
│ │ ├── zipline.finance.performance.position_tracker.PositionTracker
│ │ │ └── State_Version_1
│ │ ├── zipline.finance.performance.tracker.PerformanceTracker
│ │ │ └── State_Version_3
│ │ ├── zipline.finance.risk.cumulative.RiskMetricsCumulative
│ │ │ └── State_Version_2
│ │ ├── zipline.finance.risk.period.RiskMetricsPeriod
│ │ │ └── State_Version_2
│ │ ├── zipline.finance.risk.report.RiskReport
│ │ │ └── State_Version_1
│ │ ├── zipline.finance.slippage.FixedSlippage
│ │ │ └── State_Version_1
│ │ ├── zipline.finance.slippage.Transaction
│ │ │ └── State_Version_1
│ │ ├── zipline.finance.slippage.VolumeShareSlippage
│ │ │ └── State_Version_1
│ │ ├── zipline.protocol.Account
│ │ │ └── State_Version_1
│ │ ├── zipline.protocol.Portfolio
│ │ │ └── State_Version_1
│ │ └── zipline.protocol.Position
│ │ └── State_Version_1
│ ├── risk
│ │ ├── annotation_utils.py
│ │ ├── AnswerKeyAnnotations.ipynb
│ │ ├── AnswerKeyLink.ipynb
│ │ ├── answer_key.py
│ │ ├── __init__.py
│ │ ├── risk-answer-key-checksums
│ │ ├── test_risk_cumulative.py
│ │ ├── test_risk_period.py
│ │ └── upload_answer_key.py
│ ├── serialization_cases.py
│ ├── test_algorithm_gen.py
│ ├── test_algorithm.py
│ ├── test_assets.py
│ ├── test_batchtransform.py
│ ├── test_blotter.py
│ ├── test_cli.py
│ ├── test_doctests.py
│ ├── test_events_through_risk.py
│ ├── test_examples.py
│ ├── test_exception_handling.py
│ ├── test_execution_styles.py
│ ├── test_finance.py
│ ├── test_history.py
│ ├── test_memoize.py
│ ├── test_munge.py
│ ├── test_perf_tracking.py
│ ├── test_pickle_serialization.py
│ ├── test_rolling_panel.py
│ ├── test_security_list.py
│ ├── test_serialization.py
│ ├── test_sources.py
│ ├── test_testing.py
│ ├── test_tradesimulation.py
│ ├── test_tradingcalendar.py
│ ├── test_transforms.py
│ ├── test_transforms_talib.py
│ ├── test_versioning.py
│ └── utils
│ ├── __init__.py
│ ├── test_argcheck.py
│ ├── test_cache.py
│ ├── test_events.py
│ ├── test_factory.py
│ ├── test_final.py
│ ├── test_numpy_utils.py
│ ├── test_preprocess.py
│ └── test_sentinel.py
├── Vagrantfile
├── vagrant_init.sh
├── versioneer.py
└── zipline
├── algorithm.py
├── api.py
├── assets
│ ├── asset_db_migrations.py
│ ├── asset_db_schema.py
│ ├── assets.py
│ ├── _assets.pyx
│ ├── asset_writer.py
│ ├── futures.py
│ └── __init__.py
├── data
│ ├── _adjustments.pyx
│ ├── benchmarks.py
│ ├── constants.py
│ ├── data_portal.py
│ ├── _equities.pyx
│ ├── future_pricing.py
│ ├── __init__.py
│ ├── insertDatabase.py
│ ├── loader.py
│ ├── minute_bars.py
│ ├── mongodb.py
│ ├── paths.py
│ ├── pySched.py
│ ├── treasuries_can.py
│ ├── treasuries.py
│ ├── us_equity_pricing.py
│ └── xlsx
│ ├── 2002.xlsx
│ ├── 2003.xlsx
│ ├── 2004.xlsx
│ ├── 2005.xlsx
│ ├── 2006.xlsx
│ ├── 2007.xlsx
│ ├── 2008.xlsx
│ ├── 2009.xlsx
│ ├── 2010.xlsx
│ ├── 2011.xlsx
│ ├── 2012.xlsx
│ ├── 2013.xlsx
│ ├── 2014.xlsx
│ ├── 2015.xlsx
│ ├── 2016.xlsx
│ └── __init__.py
├── errors.py
├── examples
│ ├── buy_and_hold.py
│ ├── doubleMA.py
│ └── stock_select.py
├── finance
│ ├── blotter.py
│ ├── commission.py
│ ├── constants.py
│ ├── controls.py
│ ├── execution.py
│ ├── __init__.py
│ ├── order.py
│ ├── performance
│ │ ├── __init__.py
│ │ ├── period.py
│ │ ├── position.py
│ │ ├── position_tracker.py
│ │ └── tracker.py
│ ├── risk
│ │ ├── cumulative.py
│ │ ├── __init__.py
│ │ ├── period.py
│ │ ├── report.py
│ │ └── risk.py
│ ├── slippage.py
│ ├── trading.py
│ └── transaction.py
├── gens
│ ├── composites.py
│ ├── __init__.py
│ ├── tradesimulation.py
│ └── utils.py
├── history
│ ├── history_container.py
│ ├── history.py
│ └── __init__.py
├── __init__.py
├── lib
│ ├── adjusted_array.py
│ ├── adjustment.pyx
│ ├── _float64window.pyx
│ ├── __init__.py
│ ├── _int64window.pyx
│ ├── normalize.py
│ ├── quantiles.py
│ ├── rank.pyx
│ ├── _uint8window.pyx
│ └── _windowtemplate.pxi
├── pipeline
│ ├── classifiers
│ │ ├── classifier.py
│ │ └── __init__.py
│ ├── common.py
│ ├── data
│ │ ├── buyback_auth.py
│ │ ├── dataset.py
│ │ ├── dividends.py
│ │ ├── earnings.py
│ │ ├── equity_pricing.py
│ │ ├── __init__.py
│ │ └── testing.py
│ ├── engine.py
│ ├── expression.py
│ ├── factors
│ │ ├── events.py
│ │ ├── factor.py
│ │ ├── __init__.py
│ │ └── technical.py
│ ├── filters
│ │ ├── filter.py
│ │ └── __init__.py
│ ├── graph.py
│ ├── __init__.py
│ ├── loaders
│ │ ├── base.py
│ │ ├── blaze
│ │ │ ├── buyback_auth.py
│ │ │ ├── core.py
│ │ │ ├── dividends.py
│ │ │ ├── earnings.py
│ │ │ ├── events.py
│ │ │ └── __init__.py
│ │ ├── buyback_auth.py
│ │ ├── dividends.py
│ │ ├── earnings.py
│ │ ├── equity_pricing_loader.py
│ │ ├── events.py
│ │ ├── frame.py
│ │ ├── __init__.py
│ │ ├── synthetic.py
│ │ ├── testing.py
│ │ └── utils.py
│ ├── mixins.py
│ ├── pipeline.py
│ ├── term.py
│ └── visualize.py
├── protocol.py
├── resources
│ └── security_lists
│ └── leveraged_etf_list
│ └── 20020103
│ ├── 20120913
│ │ ├── add
│ │ └── delete
│ ├── 20120919
│ │ ├── add
│ │ └── delete
│ ├── 20121012
│ │ ├── add
│ │ └── delete
│ ├── 20130605
│ │ ├── add
│ │ └── delete
│ ├── 20130916
│ │ ├── add
│ │ └── delete
│ ├── 20131002
│ │ ├── add
│ │ └── delete
│ ├── 20131009
│ │ ├── add
│ │ └── delete
│ ├── 20131121
│ │ ├── add
│ │ └── delete
│ ├── 20131227
│ │ ├── add
│ │ └── delete
│ ├── 20140410
│ │ ├── add
│ │ └── delete
│ ├── 20140923
│ │ ├── add
│ │ └── delete
│ ├── 20141119
│ │ ├── add
│ │ └── delete
│ ├── 20141226
│ │ ├── add
│ │ └── delete
│ └── 20150123
│ ├── add
│ └── delete
├── sources
│ ├── data_frame_source.py
│ ├── data_source.py
│ ├── __init__.py
│ ├── simulated.py
│ └── test_source.py
├── test_algorithms.py
├── testing
│ ├── core.py
│ ├── fixtures.py
│ └── __init__.py
├── transforms
│ ├── batch_transform.py
│ ├── __init__.py
│ └── ta.py
├── utils
│ ├── algo_instance.py
│ ├── api_support.py
│ ├── argcheck.py
│ ├── cache.py
│ ├── cli.py
│ ├── context_tricks.py
│ ├── control_flow.py
│ ├── data.py
│ ├── data_source_tables_gen.py
│ ├── deprecate.py
│ ├── enum.py
│ ├── events.py
│ ├── factory.py
│ ├── final.py
│ ├── functional.py
│ ├── __init__.py
│ ├── input_validation.py
│ ├── math_utils.py
│ ├── memoize.py
│ ├── munge.py
│ ├── numpy_utils.py
│ ├── pandas_utils.py
│ ├── preprocess.py
│ ├── security_list.py
│ ├── sentinel.py
│ ├── serialization_utils.py
│ ├── simfactory.py
│ ├── tradingcalendar_bmf.py
│ ├── tradingcalendar_china.py
│ ├── tradingcalendar_lse.py
│ ├── tradingcalendar.py
│ └── tradingcalendar_tse.py
└── _version.py
86 directories, 365 files
标签:
相关软件
小贴士
感谢您为本站写下的评论,您的评论对其它用户来说具有重要的参考价值,所以请认真填写。
- 类似“顶”、“沙发”之类没有营养的文字,对勤劳贡献的楼主来说是令人沮丧的反馈信息。
- 相信您也不想看到一排文字/表情墙,所以请不要反馈意义不大的重复字符,也请尽量不要纯表情的回复。
- 提问之前请再仔细看一遍楼主的说明,或许是您遗漏了。
- 请勿到处挖坑绊人、招贴广告。既占空间让人厌烦,又没人会搭理,于人于己都无利。
关于好例子网
本站旨在为广大IT学习爱好者提供一个非营利性互相学习交流分享平台。本站所有资源都可以被免费获取学习研究。本站资源来自网友分享,对搜索内容的合法性不具有预见性、识别性、控制性,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,平台无法对用户传输的作品、信息、内容的权属或合法性、安全性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论平台是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二与二十三条之规定,若资源存在侵权或相关问题请联系本站客服人员,点此联系我们。关于更多版权及免责申明参见 版权及免责申明
网友评论
我要评论