-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Dayal Chand Aichara
committed
May 30, 2019
1 parent
23c606a
commit 78bf61d
Showing
8 changed files
with
126 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
Copyright (c) 2019 Dayal Chand Aichara | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated | ||
documentation files (the "Software"), to deal in the Software without restriction, including without limitation | ||
the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, | ||
and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE | ||
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR | ||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR | ||
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,6 @@ | ||
from .price_indicators import PriceIndices | ||
from .price_indicators import price, indices | ||
|
||
|
||
|
||
|
||
|
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,68 @@ | ||
# Price-Indices | ||
|
||
## Installation | ||
|
||
### pip | ||
|
||
``` | ||
pip install PriceIndics | ||
``` | ||
### From Source (Github) | ||
|
||
git clone https://github.com/dc-aichara/Price-Indices.git | ||
|
||
cd PriceIndices | ||
|
||
python3 setup.py install | ||
|
||
## Usages | ||
|
||
```python | ||
from PriceIndices import price, indices | ||
|
||
``` | ||
## Examples | ||
|
||
```python | ||
>>> price = price() | ||
|
||
>>> df = price.get_price('bitcoin', '20130428', '20190529') | ||
|
||
>>>print(df.head()) | ||
|
||
date price | ||
0 2019-05-29 8659.49 | ||
1 2019-05-28 8719.96 | ||
2 2019-05-27 8805.78 | ||
3 2019-05-26 8673.22 | ||
4 2019-05-25 8052.54 | ||
|
||
>>> df_bvol = indices.get_bvol_index(df) | ||
>>> print(df_bvol.head()) | ||
date price BVOL_Index | ||
0 2019-05-28 8719.96 0.853529 | ||
1 2019-05-27 8805.78 0.853605 | ||
2 2019-05-26 8673.22 0.849727 | ||
3 2019-05-25 8052.54 0.852357 | ||
4 2019-05-24 7987.37 0.826548 | ||
|
||
>>> indices.get_bvol_graph(df_bvol) | ||
|
||
"""This will return a plot of BVOL index against time.""" | ||
|
||
>>> df_rsi = indices.get_rsi(df) | ||
|
||
>>> print(df_rsi.tail()) | ||
date price price_change gain loss gain_average loss_average RS RSI_1 RS_Smooth RSI_2 | ||
2217 2013-05-02 105.21 7.46 7.46 0.00 1.532143 2.500000 0.612857 37.998229 0.561117 35.943306 | ||
2218 2013-05-01 116.99 11.78 11.78 0.00 2.373571 2.175714 1.090939 52.174596 0.975319 49.375257 | ||
2219 2013-04-30 139.00 22.01 22.01 0.00 3.945714 1.981429 1.991348 66.570258 1.869110 65.145981 | ||
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) | ||
|
||
"""This will return a plot of RSI against time.""" | ||
``` | ||
|
||
### License | ||
[MIT](https://choosealicense.com/licenses/mit/) © [Dayal Chand Aichara](https://github.com/dc-aichara) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[metadata] | ||
description-file = README.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import setuptools | ||
from os import path | ||
this_directory = path.abspath(path.dirname(__file__)) | ||
with open(path.join(this_directory, 'README.md'), encoding='utf-8') as f: | ||
long_description = f.read() | ||
setuptools.setup( | ||
name = 'PriceIndices', | ||
packages = ['PriceIndices'], | ||
version = '0.1', | ||
license='MIT', | ||
description = 'This package can be useful to get historical price data of cryptocurrencies from CoinMarketCap, and calculate & plot different indicators.', | ||
author = 'Dayal Chand Aichara', | ||
author_email = '[email protected]', | ||
url = 'https://github.com/dc-aichara/Price-Indices', | ||
download_url = 'https://github.com/dc-aichara/Price-Indices/archive/v_0.1.tar.gz', | ||
keywords = ['Volatility', 'blockchain', 'cryptocurrency', 'Price', 'trading'], | ||
install_requires=['requests', 'bs4', 'pandas', 'numpy', 'matplotlib'], | ||
classifiers=[ | ||
'Development Status :: 3 - Alpha', | ||
'Intended Audience :: Statistics', | ||
'Intended Audience :: Traders', | ||
'Topic :: Software Development :: Build Tools', | ||
'License :: OSI Approved :: MIT License', | ||
'Programming Language :: Python :: 3', | ||
'Operating System :: OS Independent' | ||
], | ||
long_description=long_description, | ||
long_description_content_type='text/markdown' | ||
) |