Skip to main content

📈 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!

Metadata

Release files for gunsan-strength 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gunsan-strength 0.1.1
File Size Uploaded
gunsan_strength-0.1.1.tar.gz 8.2 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for gunsan-strength 0.1.1
File
gunsan_strength-0.1.1-py3-none-any.whl Python 3 none any Details
gunsan_strength-0.1.1-cp313-cp313-musllinux_1_2_x86_64.whl CPython 3.13 CPython 3.13 Linux musl 1.2+ x86-64 Details
gunsan_strength-0.1.1-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.28+ x86-64, Linux glibc 2.5+ x86-64 Details
gunsan_strength-0.1.1-cp312-cp312-musllinux_1_2_x86_64.whl CPython 3.12 CPython 3.12 Linux musl 1.2+ x86-64 Details
gunsan_strength-0.1.1-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.5+ x86-64, Linux glibc 2.28+ x86-64 Details
gunsan_strength-0.1.1-cp311-cp311-musllinux_1_2_x86_64.whl CPython 3.11 CPython 3.11 Linux musl 1.2+ x86-64 Details
gunsan_strength-0.1.1-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.5+ x86-64, Linux glibc 2.28+ x86-64 Details
gunsan_strength-0.1.1-cp310-cp310-musllinux_1_2_x86_64.whl CPython 3.10 CPython 3.10 Linux musl 1.2+ x86-64 Details
gunsan_strength-0.1.1-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.28+ x86-64, Linux glibc 2.5+ x86-64 Details
gunsan_strength-0.1.1-cp39-cp39-musllinux_1_2_x86_64.whl CPython 3.9 CPython 3.9 Linux musl 1.2+ x86-64 Details
gunsan_strength-0.1.1-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl CPython 3.9 CPython 3.9 Linux glibc 2.28+ x86-64, Linux glibc 2.5+ x86-64 Details
gunsan_strength-0.1.1-cp38-cp38-musllinux_1_2_x86_64.whl CPython 3.8 CPython 3.8 Linux musl 1.2+ x86-64 Details
gunsan_strength-0.1.1-cp38-cp38-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl CPython 3.8 CPython 3.8 Linux glibc 2.5+ x86-64, Linux glibc 2.28+ x86-64 Details

Total release size: 2.9 MB

Release files / gunsan_strength-0.1.1.tar.gz

Download URL gunsan_strength-0.1.1.tar.gz
Size 8.2 kB
Tags Source
SHA-256 checksum
How to use checksums
e432b2b0cefd6dc99be09b088fc1b8f98c730797ddd404b25abaf4f750aa6eca
BLAKE2b-256 checksum
How to use checksums
404c19b235d4dd6dd406d15a34274f9ba4608fcea746034ad91edb1b78dc2936
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.11

Release files / gunsan_strength-0.1.1-py3-none-any.whl

Download URL gunsan_strength-0.1.1-py3-none-any.whl
Size 8.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
171e1873c779f432a25b7299990de2ff28be4374011221169ff444de1b248482
BLAKE2b-256 checksum
How to use checksums
d41028258342ef1e1e4f810509744428a875aaef88faaaaeec72bf4f72eb1409
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.11

Release files / gunsan_strength-0.1.1-cp313-cp313-musllinux_1_2_x86_64.whl

Download URL gunsan_strength-0.1.1-cp313-cp313-musllinux_1_2_x86_64.whl
Size 239.1 kB
Tags CPython 3.13 Linux musl 1.2+ x86-64
SHA-256 checksum
How to use checksums
555f68265984f075b339277a5f15ed523ee2f7edaa6afec1254bbd04430792b2
BLAKE2b-256 checksum
How to use checksums
527238b2071f2c98f9b1e2dd3a683b97b659b5c234d640f1b388ae4295045349
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.11

Release files / gunsan_strength-0.1.1-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl

Download URL gunsan_strength-0.1.1-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Size 240.5 kB
Tags CPython 3.13 Linux glibc 2.28+ x86-64 Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
bd0a8adbb9b981c3a23fa9434d1758b25f1c2c6d4a3b9bcc31f47ecfc5da35cf
BLAKE2b-256 checksum
How to use checksums
91aff6537fe0934b418844b2ecfb51b57242c7f9fcb9016c3f45d67f2a8021fe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.11

Release files / gunsan_strength-0.1.1-cp312-cp312-musllinux_1_2_x86_64.whl

Download URL gunsan_strength-0.1.1-cp312-cp312-musllinux_1_2_x86_64.whl
Size 257.0 kB
Tags CPython 3.12 Linux musl 1.2+ x86-64
SHA-256 checksum
How to use checksums
b3bfc1db6243f91daaa15612aa72da908a0377448b2d50acf895bd7bf8ff4451
BLAKE2b-256 checksum
How to use checksums
9064ae58381a92770607135b46a6b25e6a5b1e86cb305424e17aa15d4cdb2b8a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.11

Release files / gunsan_strength-0.1.1-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl

Download URL gunsan_strength-0.1.1-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Size 257.1 kB
Tags CPython 3.12 Linux glibc 2.28+ x86-64 Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
e1560576be87cab67bfa267af9a3941162cf1c61d93c8aefe753ff421e257355
BLAKE2b-256 checksum
How to use checksums
75727c43195bdd358f622f441847f932107e501754a0b545733609de2f5abfde
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.11

Release files / gunsan_strength-0.1.1-cp311-cp311-musllinux_1_2_x86_64.whl

Download URL gunsan_strength-0.1.1-cp311-cp311-musllinux_1_2_x86_64.whl
Size 276.2 kB
Tags CPython 3.11 Linux musl 1.2+ x86-64
SHA-256 checksum
How to use checksums
412969507079931b5483103c7deeb06b71ac926172c9f70f5bd4c85a4d2e0d59
BLAKE2b-256 checksum
How to use checksums
d1f086c9a0e7bba4019879b02c3e7ba831bd9d6f0d01a1a575a42b19cbbe864d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.11

Release files / gunsan_strength-0.1.1-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl

Download URL gunsan_strength-0.1.1-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Size 241.4 kB
Tags CPython 3.11 Linux glibc 2.28+ x86-64 Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
f33432c03361c4bf589ab90b07b76deb1d693d5d5e288550d2abb50344f1d561
BLAKE2b-256 checksum
How to use checksums
10b07b42e4aeebd08100c83f2aa7ce33baecf34ed29b810d786238a7540f7585
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.11

Release files / gunsan_strength-0.1.1-cp310-cp310-musllinux_1_2_x86_64.whl

Download URL gunsan_strength-0.1.1-cp310-cp310-musllinux_1_2_x86_64.whl
Size 231.1 kB
Tags CPython 3.10 Linux musl 1.2+ x86-64
SHA-256 checksum
How to use checksums
e214ab701bab70cb52985c0d64a8e1d515a70a4c51fa40ccbf80006289c1ef9d
BLAKE2b-256 checksum
How to use checksums
3e0d011aa7c1f1762be22ba228d6c3890e9e34205dd8f77e66b74dca6ef644d1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.11

Release files / gunsan_strength-0.1.1-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl

Download URL gunsan_strength-0.1.1-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Size 229.2 kB
Tags CPython 3.10 Linux glibc 2.28+ x86-64 Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
382ccd6393fb9b5a4f8fcf409c501168d372dc9bcc5ca56a113b22ae37c06b94
BLAKE2b-256 checksum
How to use checksums
caa169f45f2914bbea748b64c5ea4575a2cd7fd3b70c38d417b3eaaa0efee5a8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.11

Release files / gunsan_strength-0.1.1-cp39-cp39-musllinux_1_2_x86_64.whl

Download URL gunsan_strength-0.1.1-cp39-cp39-musllinux_1_2_x86_64.whl
Size 230.2 kB
Tags CPython 3.9 Linux musl 1.2+ x86-64
SHA-256 checksum
How to use checksums
dd39afe87f84ff3cce6dbb7e35bc92823519f7ac3cceeb50a19c136f11051502
BLAKE2b-256 checksum
How to use checksums
a117cbe579e76fa7351d68033841d66d6b01b9a719cb69008a4017898c18b7b9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.11

Release files / gunsan_strength-0.1.1-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl

Download URL gunsan_strength-0.1.1-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Size 228.3 kB
Tags CPython 3.9 Linux glibc 2.28+ x86-64 Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
556246fcadfccc0260d6636b2a6f0c7a5c0ec3963d532230bf98c657ff0dd3b5
BLAKE2b-256 checksum
How to use checksums
fa20771ffa10b26cf6038bc661972d1ff1eceeb9cc9350ed3aa157af7bf00eed
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.11

Release files / gunsan_strength-0.1.1-cp38-cp38-musllinux_1_2_x86_64.whl

Download URL gunsan_strength-0.1.1-cp38-cp38-musllinux_1_2_x86_64.whl
Size 240.5 kB
Tags CPython 3.8 Linux musl 1.2+ x86-64
SHA-256 checksum
How to use checksums
af711e9342e19432841c54626b7e75fc913c20cce23a6e42f5c6ebdf19dad343
BLAKE2b-256 checksum
How to use checksums
32ebc84d58556a3a43d02fc84baacb40c962306cec28f0e1e45bd5ac72d75099
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.11

Release files / gunsan_strength-0.1.1-cp38-cp38-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl

Download URL gunsan_strength-0.1.1-cp38-cp38-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Size 238.8 kB
Tags CPython 3.8 Linux glibc 2.28+ x86-64 Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
7429e27bb64bab1bc9bd5233517ac5ed3d9846775dacd8ee935d58bc03327176
BLAKE2b-256 checksum
How to use checksums
99252376be450d216fea246c41ecbbdfbecc46df17f41b7a86a7fc2db06307fd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.11

Release history Release notifications | RSS feed

This release

0.1.1 This release

14 release files

0.1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page