Skip to main content

Efficient Estimation of Bid-Ask Spreads from Open, High, Low, and Close Prices

Project description

Efficient Estimation of Bid-Ask Spreads from Open, High, Low, and Close Prices

Implements an efficient estimator of bid-ask spreads from open, high, low, and close prices as described in Ardia, Guidotti, & Kroencke (2021).

Installation

Install this package with:

pip install bidask

Usage

Import the estimator:

from bidask import edge

Arguments:

edge(open, high, low, close, sign=False)
field description
open Array-like vector of open prices
high Array-like vector of high prices
low Array-like vector of low prices
close Array-like vector of close prices
sign Whether signed estimates should be returned

The input prices must be sorted in ascending order of the timestamp.

The output value is the spread estimate. A value of 0.01 corresponds to a spread of 1%.

Example

import pandas as pd
from bidask import edge

df = pd.read_csv("https://raw.githubusercontent.com/eguidotti/bidask/main/pseudocode/ohlc.csv")
edge(df.Open, df.High, df.Low, df.Close)

Cite as

Ardia, David and Guidotti, Emanuele and Kroencke, Tim Alexander, "Efficient Estimation of Bid-Ask Spreads from Open, High, Low, and Close Prices". Available at SSRN: https://ssrn.com/abstract=3892335

A BibTex entry for LaTeX users is:

@unpublished{edge2021,
    author = {Ardia, David and Guidotti, Emanuele and Kroencke, Tim},
    title  = {Efficient Estimation of Bid-Ask Spreads from Open, High, Low, and Close Prices},
    year   = {2021},
    note   = {Available at SSRN}
    url    = {https://ssrn.com/abstract=3892335}
}

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

bidask-2.0.0.tar.gz (2.3 kB view details)

Uploaded Source

Built Distribution

bidask-2.0.0-py3-none-any.whl (2.9 kB view details)

Uploaded Python 3

File details

Details for the file bidask-2.0.0.tar.gz.

File metadata

  • Download URL: bidask-2.0.0.tar.gz
  • Upload date:
  • Size: 2.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.1 CPython/3.9.13 Darwin/21.3.0

File hashes

Hashes for bidask-2.0.0.tar.gz
Algorithm Hash digest
SHA256 11d9174c8050523358952e9ff63556a9d836213350c9c11b742994e16853866c
MD5 c8c83a89d265e334436a99c902438021
BLAKE2b-256 f2e980d71ebc546b1fd19d32ebd1a52e5188fe0a2b42a970626c42b674dba51b

See more details on using hashes here.

File details

Details for the file bidask-2.0.0-py3-none-any.whl.

File metadata

  • Download URL: bidask-2.0.0-py3-none-any.whl
  • Upload date:
  • Size: 2.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.1 CPython/3.9.13 Darwin/21.3.0

File hashes

Hashes for bidask-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 26fca9d1fee91b7117a55eee6a7ef8463dfe62c5e15189c4bf336b5fc82013be
MD5 d71668648e1ffac89648d928a096147e
BLAKE2b-256 ceb695af5884e58e4d8cce5de857ce393633bcd482a2a0ef5496f3e51fa02fd8

See more details on using hashes here.

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