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

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


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.43.tar.gz (28.1 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: stocks-toolkit-india-0.1.43.tar.gz
  • Upload date:
  • Size: 28.1 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.43.tar.gz
Algorithm Hash digest
SHA256 ab96315ed775fb5bf0901a47cdee31b58bae277973cfd4e781d2fe853bcbeaee
MD5 57b2f88b176725f8254db4210d10a230
BLAKE2b-256 d38517895d32b4e1334c3c2ae47db7ec9edc55e822458c3d69949eb9c69b47ce

See more details on using hashes here.

File details

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

File metadata

  • Download URL: stocks_toolkit_india-0.1.43-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.43-py3-none-any.whl
Algorithm Hash digest
SHA256 fff4c989147a9fb3d694e99bf02382d4ac89c303e7e9979e84546fbc324af3c2
MD5 fa534e1fb4c04627e95ca528e88ed28f
BLAKE2b-256 b9b24eee5faabe67dcc2edda1c80bfb7d6c2b42bb1ca4fc89dc1f7e310e2b111

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