Skip to main content

Python module to get stock and option information through Wed Scraping and Alpha Vantage API

Project description

PyPI Version License Python Version Support

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"
  1. 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
  1. 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:

alias of image
  1. 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)

Uploaded Source

Built Distribution

quant_experiment-1.0.4-py3-none-any.whl (7.1 kB view hashes)

Uploaded Python 3

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