Python module to get stock and option information through Wed Scraping and Alpha Vantage API
Project description
Features
Realtime stock and option data: You can easily extract the latest stock and option information
Option characteristics: Library provides you with option relevant characteristics based on Black-Scholes model
Installation
Installing With pip
$ pip install quant_experiment
Quickstart
Data is retrieved from Alpha Vantage API free services, make sure initializing a key variable first
key = "YOUR_API_KEY"
Operation on stock data
from quant_experiment import finproducts
stock_demo = finproducts.Stock('AAPL',key)
stock_demo.price #return realtime stock price
stock_demo.latestTradingDay #lastest trading day
stock_demo.volume #volume
Operation on option data
from quant_experiment import finproducts
option_demo = finproducts.VanillaOption('AAPL', 21, 6, 2019, 180, 'calls')
#call option with expiration date 2019-06-21 and strike price 180
option_demo.option_info()
Giving us output as:
Return option property based on Black-Scholes
from quant_experiment import finproducts
option_demo = finproducts.VanillaOption('AAPL', 21, 6, 2019, 180, 'calls')
option_demo.BS_Info(key) #return implied volatility by default
option_demo.BS_Info(key,'greeks') #return delta, gamma, vega, theta and rho
Contributing
All contributions are welcome.
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
quant_experiment-1.0.4.tar.gz
(5.8 kB
view hashes)
Built Distribution
Close
Hashes for quant_experiment-1.0.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | aca5baadf3eaf95205b4b3dfb9e496907d391952eb8995594dd13cd40bbac152 |
|
MD5 | ebf29392356118f0d031616b2318820b |
|
BLAKE2b-256 | 7def93e3b6281f1a04c28f14344bc577c0fa3f6569fcf176065e529d09f88bd3 |