该工具为本人在量化私募实习时独立编写的小工具,用于实时显示对冲期货价差。
This tool is a small tool that I wrote independently during an internship in a quant PE to display the margin of hedging futures.
1.实时显示两对冲期货价格,并可视化价差。
2.可以选择对冲期货的品种和持仓量,显示总持仓的价值
1.Real-time display futures' price & margin.
2.Can put in futures contract & spot, showing the value of the portfolio.
语言:Python(3.7)
数据处理:Pandas、NumPy
可视化:Bokeh
数据获取:AkShare
Language: Python(3.7)
Data Processing: Pandas NumPy
Data Visualization: Bokeh
Futures Data Capturing: AkShare
main.py
主文件
run_main.bat
启动文件
main.py
: main code file
run_main.bat
: run to start the project
由于本项目使用Bokeh进行可视化,结果将以网页方式显示。需要安装Python3.7以上版本并安装所需库(推荐安装Anaconda),运行方式如下:
方法一.运行run_main.bat
方法二.用cmd
于main.py
所在目录运行如下代码:
bokeh serve main.py --show
按照默认设置,结果将输出于http://localhost:5006/main
Because this porject is based on Bokeh ,result will be showed by web page.Needing Python(version>=3.7) with required framework(recommended Anaconda).The operation mode is as follows.
Mode 1: runrun_main.bat
Mode 2: usecmd
to run this code in main.py
's directory:
bokeh serve main.py --show
In default set,the result will show in http://localhost:5006/main