Get your China A-share stock metrics alpha, beta using only one line of command ๐ ๐ ๐.
pip install finstats
- -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
finstats -s sh600519 -b sh000001 -l 500
or cross-calculate multiply codes and benchmarks
finstats -s sh600519 sh601318 sz300750 -b sh000001 sh000300
finstats uses Sina HTTP API as its data source