A package for calculating Relative Strength Index (RSI) from financial data.
Project description
Hi, my name is Kartikey Vyas, This package provides functions for calculating the Relative Strength Index (RSI)
from financial data. It includes tools for loading data, calculating gains and losses,
computing rolling averages, and deriving RSI values
use the below mentioned code to see the latest day's RSI Value (Tested on many scripts of indian stock market)
import pandas as pd
from rsi_package.rsi_calculator.rsi_calculator import calculate_rsi
# Load your data into a pandas DataFrame (replace 'your_data.csv' with your actual data file)
df = pd.read_csv("yourfile.csv") (#limitation = your file should have two columns one date and other close)
# Calculate RSI
rsi_values = calculate_rsi(df)
# Add RSI values as a new column to the DataFrame
df['RSI'] = rsi_values
# Drop unnecessary columns
df = df[['date', 'close', 'RSI']]
# Display the DataFrame with RSI values
print(df.tail())
.
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
rsi_package-0.2.tar.gz
(2.0 kB
view details)
File details
Details for the file rsi_package-0.2.tar.gz.
File metadata
- Download URL: rsi_package-0.2.tar.gz
- Upload date:
- Size: 2.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f690ad3edf2d09660f0d01ff5fa20f50a62c6564519f46164133d32cc8dc1476
|
|
| MD5 |
9cb4a4ab901bddfd03e311f4e752b210
|
|
| BLAKE2b-256 |
60e4d349a19ed2d286bab9c0d40891fdb7a57e6f9fd4ff24423e67f459e7c9dc
|