Skip to content

Commit

Permalink
Added more feature
Browse files Browse the repository at this point in the history
  • Loading branch information
Dayal Chand Aichara committed Jun 24, 2019
1 parent 3d35c83 commit 64e8546
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ from PriceIndices import MarketHistory, Indices
```python
>>> history = MarketHistory()

>>> df = history.get_history('bitcoin', '20130428', '20190624')
>>> df = history.get_history('bitcoin', '20130428', '20190624') # Get Market History
>>> df.head()
Date Open* High Low Close** Volume Market Cap
0 2019-06-23 10696.69 11246.14 10556.10 10855.37 20998326502 192970090355
Expand All @@ -35,7 +35,7 @@ from PriceIndices import MarketHistory, Indices
4 2019-06-19 9078.73 9299.62 9070.40 9273.52 15546809946 164780855869


>>> df = history.get_price('bitcoin', '20130428', '20190624')
>>> df = history.get_price('bitcoin', '20130428', '20190624') # Get closing price

>>> df.head()
date price
Expand All @@ -46,7 +46,7 @@ from PriceIndices import MarketHistory, Indices
4 2019-06-19 9273.52


>>> df_bvol = Indices.get_bvol_index(df)
>>> df_bvol = Indices.get_bvol_index(df) # Calculate Volatility Index
>>> df_bvol.head()
date price BVOL_Index
0 2019-06-22 10701.69 0.636482
Expand All @@ -55,13 +55,13 @@ from PriceIndices import MarketHistory, Indices
3 2019-06-19 9273.52 0.608403
4 2019-06-18 9081.76 0.604174

>>> indices.get_bvol_graph(df_bvol)
>>> indices.get_bvol_graph(df_bvol) # Plot Volatility Index

"""
This will return a plot of BVOL index against time also save volatility index plot in your working directory as 'bvol_index.png'
"""

>>> df_rsi = indices.get_rsi(df)
>>> df_rsi = indices.get_rsi(df) # Calculate RSI

>>> print(df_rsi.tail())
date price price_change gain loss gain_average loss_average RS RSI_1 RS_Smooth RSI_2
Expand All @@ -71,12 +71,12 @@ This will return a plot of BVOL index against time also save volatility index pl
2220 2013-04-29 144.54 5.54 5.54 0.00 3.878571 1.981429 1.957462 66.187226 2.206422 68.812592
2221 2013-04-28 134.21 -10.33 0.00 10.33 3.878571 2.506429 1.547449 60.745050 1.397158 58.283931

>>> indices.get_rsi_graph(df_rsi)
>>> indices.get_rsi_graph(df_rsi) # Plot RSI

"""
This will return a plot of RSI against time and also save RSI plot in your working directory as 'rsi.png'
"""
>>> df_bb = Indices.get_bollinger_bands(df, 20)
>>> df_bb = Indices.get_bollinger_bands(df, 20) # Get Bollinger Bands and plot
>>> df_bb.tail()
date price SMA SD pluse minus
2243 2013-05-02 105.21 115.2345 6.339257 127.913013 -115.2345
Expand Down

0 comments on commit 64e8546

Please sign in to comment.