Skip to content

Command line tool to get your A-share risk metrics alpha, beta out of box

License

Notifications You must be signed in to change notification settings

chrisHchen/finstats

Repository files navigation

PyPI github action

Introduction 💪

Get your China A-share stock metrics alpha, beta using only one line of command 🚀 🚀 🚀.

Installation 🔌

pip install finstats

Usage 🏄

args 🚩:

  • -s: specify the stock code
  • -b: specify the benchmark code, usually sh000001, sh000300
  • -r: risk free return. default 0
  • -p: period. periodicity of the 'returns' data:: y/q/m/w/d, default is d
  • -l: number of records to fetch, default is 252.

use finstats --help to see more details

example 🍔:

finstats -s sh600519 -b sh000001 -l 500

or cross-calculate multiply codes and benchmarks

finstats -s sh600519 sh601318 sz300750 -b sh000001 sh000300

Data Source 🔋

finstats uses Sina HTTP API as its data source

About

Command line tool to get your A-share risk metrics alpha, beta out of box

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Languages