Need help with py-market-profile?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

bfolkens
145 Stars 63 Forks Other 51 Commits 3 Opened issues

Description

A library to calculate Market Profile (aka Volume Profile) for financial data from a Pandas DataFrame.

Services available

!
?

Need anything else?

Contributors list

# 252,432
Elixir
HTML
Erlang
trading...
19 commits

==============

Market Profile

.. image:: https://api.travis-ci.org/bfolkens/py-market-profile.svg?branch=master :alt: Travis-CI Build Status :target: https://travis-ci.org/bfolkens/py-market-profile

.. image:: https://readthedocs.org/projects/marketprofile/badge/?version=latest :target: https://marketprofile.readthedocs.io/en/latest/?badge=latest :alt: Documentation Status

A library to calculate Market Profile (Volume Profile) from a Pandas DataFrame. This library expects the DataFrame to have an index of

timestamp
and columns for each of the OHLCV values.
  • Free software: BSD license

Installation

::

pip install marketprofile

Example

You can view a Jupyter notebook of an example with charts here:

_

Pull in some data to play with:

from marketprofile import MarketProfile import pandasdatareader as data amzn = data.getdatayahoo('AMZN', '2019-12-01', '2019-12-31')

Create the MarketProfile object from a Pandas DataFrame:

mp = MarketProfile(amzn) mp_slice = mp[amzn.index.min():amzn.index.max()]

Once you've chosen a slice, you can return the profile series:

mp_slice.profile Close 1739.25 2514300 1740.50 2823800 1748.75 2097600 1749.55 2442800 1751.60 3117400 1760.35 3095900 1760.70 2670100 1760.95 2745700 1769.25 3145200 1770.00 3380900 1781.60 3925600 1784.05 3351400 1786.50 5150800 1789.25 881300 1790.70 3644400 1792.30 2652800 1793.00 2136400 1846.90 3674700 1847.85 2506500 1868.80 6005400 1869.85 6186600 Name: Volume, dtype: int64

Or you can also access individual attributes and properties:

mpslice.initialbalance() (1762.680054, 1805.550049)

mpslice.openrange() (1762.680054, 1805.550049)

mpslice.pocprice 1869.850000

mpslice.profilerange (1739.25, 1869.85)

mpslice.valuearea (1760.95, 1869.85)

mpslice.balancedtarget 2000.4499999999998

mpslice.lowvalue_nodes Close 1748.75 2097600 1760.70 2670100 1784.05 3351400 1789.25 881300 1793.00 2136400 1847.85 2506500 Name: Volume, dtype: int64

mpslice.highvalue_nodes Close 1740.5 2823800 1751.6 3117400 1781.6 3925600 1786.5 5150800 1790.7 3644400 1846.9 3674700 Name: Volume, dtype: int64

Documentation

https://marketprofile.readthedocs.io/

What is

Market Profile 
_ and
How are these calculated 
_?

A discussion on the difference between TPO (Time Price Opportunity) and VOL (Volume Profile) chart types:

_

Development

To run the all tests run::

tox

Development sponsored in part by Cignals, LLC. - Bitcoin

Order Flow and Footprint Charts 
_.

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.