Skip to main content

VisualPortfolio 0.1.4

Project description

将策略或者资产包的表现可视化。大量参考以及模仿自 pyfolio ,包括图的配置以及代码。

This tool is used to visualize the perfomance of a portfolio. Much of the codes and samples come from the original referenced project: pyfolio

依赖

lxml
matplotlib
numpy
pandas
seaborn
tushare

安装

首先将代码``clone``至本地:

git clone https://github.com/ChinaQuants/VisualPortfolio.git (如果你是从github获取)

安装

cd VisualPortfolio
python setpy.py install

例子

In [1]: %matplotlib inline
In [2]: from VisualPortfolio import createPerformanceTearSheet
In [3]: from pandas_datareader import data
In [4]: prices = data.get_data_yahoo('600000.ss')['Close']
In [5]: benchmark = data.get_data_yahoo('000300.ss')['Close']
......: benchmark.name = "000300.ss"
In [6]: perf_matric, perf_df = createPerformanceTearSheet(prices=prices, benchmark=benchmark)
img/1.png img/2.png img/3.png img/4.png

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

VisualPortfolio-0.1.4.tar.gz (8.4 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page