Coder Social home page Coder Social logo

hugogobato / yang-zhang-s-realized-volatility-automated-estimation-in-python Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 1.0 742 KB

This software automatizes the estimation of Yang & Zhang's RV proxy for financial securities

License: MIT License

Python 100.00%

yang-zhang-s-realized-volatility-automated-estimation-in-python's Introduction

Yang-Zhang-s-Realized-Volatility-Automated-Estimation-in-Python

This software automatizes the estimation of Yang & Zhang's RV proxy for financial securities

Content

The Python Code named as Yang_Zhang_RV_proxy.py estimates Yang & Zhang's Realized Volatility from high-frequency intraday stock data. It contains four functions: Yang_Zhang_RV_yahoo, Yang_Zhang_RV_own_data, Multivariate_Yang_Zhang_RV_own_data, and Multivariate_Yang_Zhang_RV_yahoo. The functions containing 'yahoo' in their name make use of Yahoo Finance's API through the Python library yfinance. Additionally, in the folder Examples, examples in Jupyter Notebooks of the code use can be found for univariate and multivariate data with common mistakes made when using the code.

Functions Description

Yang_Zhang_RV_yahoo(tickers, start=None, end=None, period=None, interval=None)

Needed parameters: tickers = list containing stock's ticker as shown in Yahoo Finance (e.g. ["^GSPC"], ["^IXIC"], ["^RUT"], ["^DJI"], etc), interval = string containing the frequency of data (e.g. "1m", "5m", "15m", "30m", etc.)

Semi-optional parameters: start = date from when the data extraction should start (e.g. "2004-12-30", "2005-12-30", "2006-12-30", etc.), end = date when the data extraction should end (e.g. "2020-12-30", "2021-12-30", "2022-12-30", etc.), period = number of days ago that the data extraction should consider (should be used only if start and end parameters are not used, and vice-versa) (e.g. "7d", "30d", "60d", etc.)

Yang_Zhang_RV_own_data(data)

Needed parameters: data = Pandas DataFrame containing an index named "Date" and with DatetimeIndex as data type, and the following columns: "Close": high-frequency intraday stock close prices, "Open": high-frequency intraday stock open prices, "High": high-frequency intraday stock high prices, "Low": high-frequency intraday stock low prices (the order of the columns is not important).

Multivariate_Yang_Zhang_RV_own_data(data_list)

Needed parameters: data_list = a list containing Pandas DataFrames containing an index named "Date" and with DatetimeIndex as data type, and the following columns: "Close": high-frequency intraday stock close prices, "Open": high-frequency intraday stock open prices, "High": high-frequency intraday stock high prices, "Low": high-frequency intraday stock low prices (the order of the columns is not important).

Multivariate_Yang_Zhang_RV_yahoo(tickers, start=None, end=None, period=None, interval=None)

Needed parameters: tickers = list containing stocks' tickers as shown in Yahoo Finance (e.g. ["^GSPC", "^IXIC", "^RUT", "^DJI"]), interval = string containing the frequency of data (e.g. "1m", "5m", "15m", "30m", etc.)

Semi-optional parameters: start = date from when the data extraction should start (e.g. "2004-12-30", "2005-12-30", "2006-12-30", etc.), end = date when the data extraction should end (e.g. "2020-12-30", "2021-12-30", "2022-12-30", etc.), period = number of days ago that the data extraction should consider (should be used only if start and end parameters are not used, and vice-versa) (e.g. "7d", "30d", "60d", etc.)

Authors

@authors: Hugo Gobato Souto* and Amir Moradi**

*International School of Business at HAN University of Applied Sciences, Ruitenberglaan 31, 6826 CC Arnhem, the Netherlands; [email protected]; https://orcid.org/0000-0002-7039-0572

Contact author. **International School of Business at HAN University of Applied Sciences, Ruitenberglaan 31, 6826 CC Arnhem, the Netherlands; [email protected]; https://orcid.org/0000-0003-1169-7192.

yang-zhang-s-realized-volatility-automated-estimation-in-python's People

Contributors

hugogobato avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

softwareimpacts

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.