Skip to main content

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 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. Note- Functionality for Graph and better visualisation of data will be added.

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") 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") 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:

st.nse_to_bse("INFY")) 500209

and to convert bse symbol to nse symbol use:

st.bse_to_nse("500325")) RELIANCE

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

stocks-toolkit-india-0.1.42.tar.gz (27.9 kB view details)

Uploaded Source

Built Distribution

stocks_toolkit_india-0.1.42-py3-none-any.whl (27.9 kB view details)

Uploaded Python 3

File details

Details for the file stocks-toolkit-india-0.1.42.tar.gz.

File metadata

  • Download URL: stocks-toolkit-india-0.1.42.tar.gz
  • Upload date:
  • Size: 27.9 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

Hashes for stocks-toolkit-india-0.1.42.tar.gz
Algorithm Hash digest
SHA256 d4909233cc1e334ccbcab5921d31befab4e7ecebb99c9f88cabeabb2d101b968
MD5 4df78265692acbfa918b6fd1ff3ee022
BLAKE2b-256 ce671b40e902fc0612f8b4f3eece2c8fbaef0a2adde088b6904b3db927458d14

See more details on using hashes here.

File details

Details for the file stocks_toolkit_india-0.1.42-py3-none-any.whl.

File metadata

  • Download URL: stocks_toolkit_india-0.1.42-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

Hashes for stocks_toolkit_india-0.1.42-py3-none-any.whl
Algorithm Hash digest
SHA256 54e27fe03da635bbf0a285042cc2ffcb8de17d0fca6be458e2172d8e9a5654de
MD5 e92e3c4a4434f91446fbcf7811b76d66
BLAKE2b-256 58966a2d64e94d62526a872d91578a3477096d2b129cae12117905e5e3278919

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