Skip to main content

GunSan Strength Index (GSI) – A proprietary leading and lagging indicator for measuring technical strength of a scrip.

Project description

📈 GunSan Strength Index (GSI)

GunSan Strength Index (GSI) is a proprietary technical indicator developed to measure the strength of a financial instrument using a blend of trend, momentum, and volatility signals.

This package allows analysts, traders, and quant developers to calculate and visualize a smoothed strength index derived from a combination of leading and lagging indicators – Hence,GunSan Strength Index(GSI) is both a leading and lagging indicator.


🚀 Features

  • ✅ Easy-to-use API: get_gunsan_strength(df)
  • 📊 Interactive visualization using Plotly
  • 🔒 Internal proprietary logic kept private
  • 📦 Clean Python package, pip installable
  • 🧠 Built using vectorbt and pandas-ta

🧪 Example Usage

from gunsan_strength.core import get_gunsan_strength
from gunsan_strength.plots import plot_gunsan_strength
from datetime import date
import matplotlib.pyplot as plt
import yfinance as yf
import os
import warnings
warnings.simplefilter(action='ignore')

# Define the ticker symbol,time span for Natural Gas futures
ticker_symbol = 'NG=F'
start_dt= '2019-10-28'
end_dt= date.today().strftime("%Y-%m-%d")

# Download historical data for NG futures
df = yf.download(ticker_symbol, start=start_dt, end=end_dt, multi_level_index=False)
df.reset_index(inplace=True)

# Compute GunSan Strength Index
result = get_gunsan_strength(df, signal_window=50)

# Plot the result
plot_gunsan_strength(result)

📦 Installation

You can install the package directly using:

pip install gunsan-strength

For local development:

git clone https://github.com/santosh3110/GunSan-Strength-Index.git
cd GunSan-Strength-Index
pip install -e .

📘 Functionality

get_gunsan_strength(df: pd.DataFrame, signal_window: int = 50)

  • Takes a DataFrame with OHLC data and computes:
    • Technical_Strength: raw strength signal
    • Technical_Strength_Signal: smoothed signal

plot_gunsan_strength(df)

  • Takes the result of get_gunsan_strength() and plots:

    • Close Price (zoomable)
    • GunSan Strength Indicator (interactive)

    alt text

📖 User Guide

  • This is both a Lagging and Leading Indicator:

    • Historical strength peaks act as overbought zone and a potential reversal - Bearish
    • Historical strength troughs act as oversold zone and a potential reversal - Bullish
    • Above Zero line positive zone
    • Below Zero line negative zone
    • Zero line acts as Support and Resistance
    • Bullish and Bearish Divergences suggest potential reversal points

    alt text

    alt text


🔐 Disclaimer

The internal logic used in computing the GunSan Strength Index is proprietary and not open-sourced. This package provides access to the results without exposing the underlying formula.


🛠 Dependencies

  • pandas, numpy
  • vectorbt, pandas-ta
  • plotly, yfinance

See requirements.txt for full list.


📄 License

Licensed under the Apache License 2.0.


🙏 Acknowledgements

  • Built with ❤️ by @santosh3110
  • Inspired by old school technical analysis
  • Dedicated to my Guru, the legendary AS Chakravathy!

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

gunsan_strength-0.1.1.tar.gz (8.2 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

gunsan_strength-0.1.1-py3-none-any.whl (8.6 kB view details)

Uploaded Python 3

gunsan_strength-0.1.1-cp313-cp313-musllinux_1_2_x86_64.whl (239.1 kB view details)

Uploaded CPython 3.13musllinux: musl 1.2+ x86-64

gunsan_strength-0.1.1-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (240.5 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.28+ x86-64manylinux: glibc 2.5+ x86-64

gunsan_strength-0.1.1-cp312-cp312-musllinux_1_2_x86_64.whl (257.0 kB view details)

Uploaded CPython 3.12musllinux: musl 1.2+ x86-64

gunsan_strength-0.1.1-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (257.1 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ x86-64manylinux: glibc 2.5+ x86-64

gunsan_strength-0.1.1-cp311-cp311-musllinux_1_2_x86_64.whl (276.2 kB view details)

Uploaded CPython 3.11musllinux: musl 1.2+ x86-64

gunsan_strength-0.1.1-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (241.4 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ x86-64manylinux: glibc 2.5+ x86-64

gunsan_strength-0.1.1-cp310-cp310-musllinux_1_2_x86_64.whl (231.1 kB view details)

Uploaded CPython 3.10musllinux: musl 1.2+ x86-64

gunsan_strength-0.1.1-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (229.2 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.28+ x86-64manylinux: glibc 2.5+ x86-64

gunsan_strength-0.1.1-cp39-cp39-musllinux_1_2_x86_64.whl (230.2 kB view details)

Uploaded CPython 3.9musllinux: musl 1.2+ x86-64

gunsan_strength-0.1.1-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (228.3 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.28+ x86-64manylinux: glibc 2.5+ x86-64

gunsan_strength-0.1.1-cp38-cp38-musllinux_1_2_x86_64.whl (240.5 kB view details)

Uploaded CPython 3.8musllinux: musl 1.2+ x86-64

gunsan_strength-0.1.1-cp38-cp38-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (238.8 kB view details)

Uploaded CPython 3.8manylinux: glibc 2.28+ x86-64manylinux: glibc 2.5+ x86-64

File details

Details for the file gunsan_strength-0.1.1.tar.gz.

File metadata

  • Download URL: gunsan_strength-0.1.1.tar.gz
  • Upload date:
  • Size: 8.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.11

File hashes

Hashes for gunsan_strength-0.1.1.tar.gz
Algorithm Hash digest
SHA256 e432b2b0cefd6dc99be09b088fc1b8f98c730797ddd404b25abaf4f750aa6eca
MD5 e2aaaa8a8d4908ff87648a29fb321a81
BLAKE2b-256 404c19b235d4dd6dd406d15a34274f9ba4608fcea746034ad91edb1b78dc2936

See more details on using hashes here.

File details

Details for the file gunsan_strength-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for gunsan_strength-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 171e1873c779f432a25b7299990de2ff28be4374011221169ff444de1b248482
MD5 fd85d82e15285d3e5ed5b5f13ef94562
BLAKE2b-256 d41028258342ef1e1e4f810509744428a875aaef88faaaaeec72bf4f72eb1409

See more details on using hashes here.

File details

Details for the file gunsan_strength-0.1.1-cp313-cp313-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for gunsan_strength-0.1.1-cp313-cp313-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 555f68265984f075b339277a5f15ed523ee2f7edaa6afec1254bbd04430792b2
MD5 bdd7db3765975c1110a26ce4b70496ab
BLAKE2b-256 527238b2071f2c98f9b1e2dd3a683b97b659b5c234d640f1b388ae4295045349

See more details on using hashes here.

File details

Details for the file gunsan_strength-0.1.1-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl.

File metadata

File hashes

Hashes for gunsan_strength-0.1.1-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 bd0a8adbb9b981c3a23fa9434d1758b25f1c2c6d4a3b9bcc31f47ecfc5da35cf
MD5 8d1ea6897444913cfaed284e9417028d
BLAKE2b-256 91aff6537fe0934b418844b2ecfb51b57242c7f9fcb9016c3f45d67f2a8021fe

See more details on using hashes here.

File details

Details for the file gunsan_strength-0.1.1-cp312-cp312-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for gunsan_strength-0.1.1-cp312-cp312-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 b3bfc1db6243f91daaa15612aa72da908a0377448b2d50acf895bd7bf8ff4451
MD5 b14c86dc113186084ea0d644e26e4e63
BLAKE2b-256 9064ae58381a92770607135b46a6b25e6a5b1e86cb305424e17aa15d4cdb2b8a

See more details on using hashes here.

File details

Details for the file gunsan_strength-0.1.1-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl.

File metadata

File hashes

Hashes for gunsan_strength-0.1.1-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 e1560576be87cab67bfa267af9a3941162cf1c61d93c8aefe753ff421e257355
MD5 79696d970e1916844ea1272da4fb36b8
BLAKE2b-256 75727c43195bdd358f622f441847f932107e501754a0b545733609de2f5abfde

See more details on using hashes here.

File details

Details for the file gunsan_strength-0.1.1-cp311-cp311-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for gunsan_strength-0.1.1-cp311-cp311-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 412969507079931b5483103c7deeb06b71ac926172c9f70f5bd4c85a4d2e0d59
MD5 5cf6a6c35e4264b56cd8bb3fa9e7d857
BLAKE2b-256 d1f086c9a0e7bba4019879b02c3e7ba831bd9d6f0d01a1a575a42b19cbbe864d

See more details on using hashes here.

File details

Details for the file gunsan_strength-0.1.1-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl.

File metadata

File hashes

Hashes for gunsan_strength-0.1.1-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 f33432c03361c4bf589ab90b07b76deb1d693d5d5e288550d2abb50344f1d561
MD5 612ffb0771ff9ceed1b689754a97d569
BLAKE2b-256 10b07b42e4aeebd08100c83f2aa7ce33baecf34ed29b810d786238a7540f7585

See more details on using hashes here.

File details

Details for the file gunsan_strength-0.1.1-cp310-cp310-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for gunsan_strength-0.1.1-cp310-cp310-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 e214ab701bab70cb52985c0d64a8e1d515a70a4c51fa40ccbf80006289c1ef9d
MD5 ee2499514bf47c6d6ab1210d551dec44
BLAKE2b-256 3e0d011aa7c1f1762be22ba228d6c3890e9e34205dd8f77e66b74dca6ef644d1

See more details on using hashes here.

File details

Details for the file gunsan_strength-0.1.1-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl.

File metadata

File hashes

Hashes for gunsan_strength-0.1.1-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 382ccd6393fb9b5a4f8fcf409c501168d372dc9bcc5ca56a113b22ae37c06b94
MD5 9f9145cc8b66b7c4745256c976977e01
BLAKE2b-256 caa169f45f2914bbea748b64c5ea4575a2cd7fd3b70c38d417b3eaaa0efee5a8

See more details on using hashes here.

File details

Details for the file gunsan_strength-0.1.1-cp39-cp39-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for gunsan_strength-0.1.1-cp39-cp39-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 dd39afe87f84ff3cce6dbb7e35bc92823519f7ac3cceeb50a19c136f11051502
MD5 ee579991a73eff8ef8b74bfec4838d43
BLAKE2b-256 a117cbe579e76fa7351d68033841d66d6b01b9a719cb69008a4017898c18b7b9

See more details on using hashes here.

File details

Details for the file gunsan_strength-0.1.1-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl.

File metadata

File hashes

Hashes for gunsan_strength-0.1.1-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 556246fcadfccc0260d6636b2a6f0c7a5c0ec3963d532230bf98c657ff0dd3b5
MD5 f5b57ae6a6f01c717c0331c3ac087cbb
BLAKE2b-256 fa20771ffa10b26cf6038bc661972d1ff1eceeb9cc9350ed3aa157af7bf00eed

See more details on using hashes here.

File details

Details for the file gunsan_strength-0.1.1-cp38-cp38-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for gunsan_strength-0.1.1-cp38-cp38-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 af711e9342e19432841c54626b7e75fc913c20cce23a6e42f5c6ebdf19dad343
MD5 63983cf8f69ef4b544c0598a7dc27c17
BLAKE2b-256 32ebc84d58556a3a43d02fc84baacb40c962306cec28f0e1e45bd5ac72d75099

See more details on using hashes here.

File details

Details for the file gunsan_strength-0.1.1-cp38-cp38-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl.

File metadata

File hashes

Hashes for gunsan_strength-0.1.1-cp38-cp38-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 7429e27bb64bab1bc9bd5233517ac5ed3d9846775dacd8ee935d58bc03327176
MD5 06b6247d8f6ec5ba2bba9e92073dc951
BLAKE2b-256 99252376be450d216fea246c41ecbbdfbecc46df17f41b7a86a7fc2db06307fd

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page