Toolkit for performing analysis on indian stock market
Project description
stocks_toolkit_india
Toolkit for NSE/BSE stocks comprises of various functionalities like historical technical data and candle pattern detection.
To Install the package:
pip install stocks-toolkit-india
Note- This library needs TA-lib to be installed. To know more about how to install it https://github.com/mrjbq7/ta-lib
Note- Functionality for Graph and better visualisation of data will be added.
UPDATE - NSE no more allows to get data more than 365 days. This library is designed to provide in depth analysis of recent trend pattern of a stock.
For getting technical Data of a stock, the data is in pandas DataFrame Form.
from stock_toolkit import stock_toolkit
st = stock_toolkit()
stock_df = st.technical_data("INFY","01-01-2021","01-7-2021")
print(stock_df)
Symbol Series Date Prev Close Open Price High Price ... Average Price Total Traded Quantity Turnover No. of Trades Deliverable Qty % Dly Qt to Traded Qty
0 INFY EQ 01-Jan-2021 1255.80 1257.90 1265.50 ... 1261.66 4253550.0 5366530407.75 97445.0 1089987.0 25.63
1 INFY EQ 04-Jan-2021 1260.45 1269.00 1290.00 ... 1278.28 7208454.0 9214400329.00 189946.0 3343139.0 46.38
2 INFY EQ 05-Jan-2021 1288.25 1282.00 1299.00 ... 1289.82 8145280.0 10505964474.35 168537.0 3346702.0 41.09
.. ... ... ... ... ... ... ... ... ... ... ... ... ...
121 INFY EQ 30-Jun-2021 1563.05 1572.05 1591.00 ... 1582.44 6058722.0 9587562981.95 167938.0 3226132.0 53.25
122 INFY EQ 01-Jul-2021 1580.80 1576.85 1576.85 ... 1565.56 4814317.0 7537112360.90 150925.0 2996603.0 62.24
[123 rows x 15 columns]
For getting the candle analysis, candle patter found in the stock:
candles = st.candle_analysis("INFY","01-01-2021","01-7-2021")
print(candles)
open close high low date candles_found
0 1257.90 1260.45 1265.50 1255.80 01-Jan-2021 []
1 1269.00 1288.25 1290.00 1261.15 04-Jan-2021 []
2 1282.00 1293.80 1299.00 1275.05 05-Jan-2021 []
3 1300.00 1282.10 1302.00 1268.05 06-Jan-2021 []
4 1296.00 1262.15 1297.65 1255.50 07-Jan-2021 []
.. ... ... ... ... ... ...
118 1572.00 1574.20 1578.00 1543.00 25-Jun-2021 [CDLDOJI:Bullish, CDLDOJISTAR:Bearish, CDLLONG...
119 1572.90 1571.80 1580.15 1560.60 28-Jun-2021 [CDLDOJI:Bullish, CDLHIGHWAVE:Bearish, CDLLONG...
120 1561.00 1563.05 1573.65 1559.20 29-Jun-2021 [CDLDOJI:Bullish, CDLGRAVESTONEDOJI:Bullish, C...
121 1572.05 1580.80 1591.00 1572.05 30-Jun-2021 [CDLSHOOTINGSTAR:Bearish]
[123 rows x 6 columns]
The 'candles_found' column contains array of candle name along with their characterstics i.e Bullish/Bearish
CDLGRAVESTONEDOJI:Bullish => Grave Stone Doji candle pattern indicating Bullish behavoiour.
Note - A single array can have candles indicating both Bearish and Bullish behavious. Read more about Japanese Candle stick patterns - https://www.nomuradirect.com/pdf/21_Candlesticks.pdf
Both NSE symbol and BSE symbol can be provided as symbol in both of the above functions. If the data is available with NSE, both of the function will return data.
To convert NSE symbol to bse symbol use:
print(st.nse_to_bse("INFY")))
500209
and to convert bse symbol to nse symbol use:
print(st.bse_to_nse("500325")))
RELIANCE
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file stocks-toolkit-india-0.1.44.tar.gz
.
File metadata
- Download URL: stocks-toolkit-india-0.1.44.tar.gz
- Upload date:
- Size: 28.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a22cfd91d3f289f286b210fab63ed10ba2204cbb8513dc857befbe8dab33b73e |
|
MD5 | d2486ee9741658313aba20b8ae4ae48d |
|
BLAKE2b-256 | dd557b77687245f175d6b715fe0d3869e0a35176408cc50002ce8d766c763e22 |
File details
Details for the file stocks_toolkit_india-0.1.44-py3-none-any.whl
.
File metadata
- Download URL: stocks_toolkit_india-0.1.44-py3-none-any.whl
- Upload date:
- Size: 27.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 58496e44af38426146ffae1dc4bde70e259d5b7025bb9d57179c0b2a6e8a3800 |
|
MD5 | 2d8cddcad1a5d182d022215d2b90c473 |
|
BLAKE2b-256 | 1e48c0c91e9ebfbf0072eed3a1b1dd7d16ba17a415c3f87e863c44ebc9b38beb |