QuantResearch 0.0.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Vinayak shinde
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,40 @@
1
+ Metadata-Version: 2.4
2
+ Name: QuantResearch
3
+ Version: 0.0.1
4
+ Summary: Technical indicators and visualization tools for quantitative research
5
+ Home-page: https://github.com/vinayak1729-web/QuantR
6
+ Author: Vinayak Shinde
7
+ Author-email: Vinayak Shinde <vinayak.r.shinde.1729@gmail.com>
8
+ License: MIT
9
+ Project-URL: Homepage, https://github.com/vinayak1729-web/QuantR
10
+ Project-URL: Repository, https://github.com/vinayak1729-web/QuantR
11
+ Project-URL: Issues, https://github.com/vinayak1729-web/QuantR/issues
12
+ Project-URL: Documentation, https://github.com/vinayak1729-web/QuantR#readme
13
+ Keywords: finance,trading,technical-analysis,indicators,quantitative
14
+ Classifier: Development Status :: 3 - Alpha
15
+ Classifier: Intended Audience :: Developers
16
+ Classifier: Intended Audience :: Financial and Insurance Industry
17
+ Classifier: Topic :: Office/Business :: Financial :: Investment
18
+ Classifier: Programming Language :: Python :: 3
19
+ Classifier: Programming Language :: Python :: 3.7
20
+ Classifier: Programming Language :: Python :: 3.8
21
+ Classifier: Programming Language :: Python :: 3.9
22
+ Classifier: Programming Language :: Python :: 3.10
23
+ Classifier: Programming Language :: Python :: 3.11
24
+ Classifier: License :: OSI Approved :: MIT License
25
+ Classifier: Operating System :: OS Independent
26
+ Requires-Python: >=3.7
27
+ Description-Content-Type: text/markdown
28
+ License-File: LICENSE
29
+ Requires-Dist: yfinance>=0.2.0
30
+ Requires-Dist: pandas>=1.3.0
31
+ Requires-Dist: matplotlib>=3.4.0
32
+ Provides-Extra: dev
33
+ Requires-Dist: pytest>=7.0; extra == "dev"
34
+ Requires-Dist: black>=22.0; extra == "dev"
35
+ Requires-Dist: flake8>=4.0; extra == "dev"
36
+ Requires-Dist: mypy>=0.950; extra == "dev"
37
+ Dynamic: author
38
+ Dynamic: home-page
39
+ Dynamic: license-file
40
+ Dynamic: requires-python
@@ -0,0 +1,2 @@
1
+ from .indicators import*
2
+ from .visualize import*
@@ -0,0 +1,48 @@
1
+ import yfinance as yf
2
+ def fetch_data(ticker,start_date,end_date):
3
+ return yf.download(tickers=ticker,start=start_date,end=end_date,auto_adjust=False)
4
+
5
+ def Rsi(price,period=14):
6
+
7
+ delta = price.diff()
8
+ gain =(delta.where(delta>0,0)).rolling(window=period).mean()
9
+ loss =(-delta.where(delta<0,0)).rolling(window=period).mean()
10
+ return (100-(100/(1+(gain/loss))))
11
+
12
+
13
+ def bb_bands(price,period=20,num_std=2):
14
+ rolling_mean =price.rolling(window=period).mean()
15
+ rolling_std =price.rolling(window=period).std()
16
+ upper_band = rolling_mean+(rolling_std*num_std)
17
+ lower_band = rolling_mean-(rolling_std*num_std)
18
+ return upper_band,rolling_mean,lower_band
19
+
20
+
21
+ def macd(price,short_period=12,long_period=26,signal_period=9):
22
+ shortLine = price.ewm(span=short_period,adjust=False).mean()
23
+ longLine = price.ewm(span=long_period,adjust=False).mean()
24
+ macd_line = shortLine-longLine
25
+ signalLine = macd_line.ewm(span=signal_period,adjust=False).mean()
26
+ histogram =macd_line-signalLine
27
+ return macd_line , signalLine , histogram
28
+
29
+ def sma(price,period=9):
30
+ return price.rolling(window =period).mean()
31
+
32
+ def ema(price,period=9):
33
+ return price.ewm(span=period,adjust =False).mean()
34
+
35
+
36
+ def demma(price,period =9):
37
+ ema = price.ewm(span=period,adjust =False).mean()
38
+ Eema1 =ema.ewm(span=period,adjust = False).mean()
39
+ Eema2=Eema1.ewm(span=period,adjust = False).mean()
40
+ demma = 2*(ema) -(Eema1)
41
+ return demma
42
+
43
+ def temma(price,period =9):
44
+ ema = price.ewm(span=period,adjust =False).mean()
45
+ Eema1 =ema.ewm(span=period,adjust = False).mean()
46
+ Eema2=Eema1.ewm(span=period,adjust = False).mean()
47
+ temma = 3*ema -(3*Eema1)+Eema2
48
+ return temma
@@ -0,0 +1,58 @@
1
+
2
+ import matplotlib.pyplot as plt
3
+
4
+ def show_macd(macdline, signalLine, hist, ticker):
5
+ fig, ax = plt.subplots(figsize=(10,6))
6
+
7
+ # MACD and signal lines
8
+ macdline.plot(ax=ax, label='MACD', color='blue')
9
+ signalLine.plot(ax=ax, label='Signal', color='orange')
10
+
11
+ # Histogram (bar) with colors by sign
12
+ colors = hist.apply(lambda x: 'green' if x >= 0 else 'red')
13
+ ax.bar(hist.index, hist.values, color=colors, alpha=0.8)
14
+
15
+ ax.set_title(f"MACD, Signal & Histogram for {ticker}")
16
+ ax.legend()
17
+ plt.show()
18
+
19
+
20
+ def plot_bollinger(ajd_close,bb_upper,bb_mid,bb_lower, ticker=None):
21
+ plt.figure(figsize=(10,6))
22
+
23
+ plt.plot(ajd_close, label='Adj Close')
24
+ plt.plot(bb_upper, color='red', linestyle='--', label='BB-UPPER')
25
+ plt.plot(bb_mid, color='orange', label='rolling mean')
26
+ plt.plot(bb_lower, color='red', linestyle='--', label='BB-LOWER')
27
+
28
+ plt.xlabel('date')
29
+ plt.ylabel('price')
30
+ title = 'Bollinger Bands'
31
+ if ticker is not None:
32
+ title += f' for {ticker}'
33
+ plt.title(title)
34
+
35
+ plt.legend()
36
+ plt.grid(True)
37
+ plt.tight_layout()
38
+ plt.show()
39
+
40
+
41
+ def plot_rsi(rsi, period=14, lower=30, upper=70, ticker=None):
42
+ plt.figure(figsize=(10,4))
43
+ plt.plot(rsi, label=f'RSI {period}', color='purple')
44
+
45
+ # horizontal lines
46
+ plt.axhline(y=upper, color='red', linestyle='--', linewidth=1)
47
+ plt.axhline(y=lower, color='green', linestyle='--', linewidth=1)
48
+
49
+ plt.ylim(0, 100)
50
+ title = f'RSI ({period})'
51
+ if ticker is not None:
52
+ title += f' for {ticker}'
53
+ plt.title(title)
54
+
55
+ plt.legend()
56
+ plt.grid(True)
57
+ plt.tight_layout()
58
+ plt.show()
@@ -0,0 +1,40 @@
1
+ Metadata-Version: 2.4
2
+ Name: QuantResearch
3
+ Version: 0.0.1
4
+ Summary: Technical indicators and visualization tools for quantitative research
5
+ Home-page: https://github.com/vinayak1729-web/QuantR
6
+ Author: Vinayak Shinde
7
+ Author-email: Vinayak Shinde <vinayak.r.shinde.1729@gmail.com>
8
+ License: MIT
9
+ Project-URL: Homepage, https://github.com/vinayak1729-web/QuantR
10
+ Project-URL: Repository, https://github.com/vinayak1729-web/QuantR
11
+ Project-URL: Issues, https://github.com/vinayak1729-web/QuantR/issues
12
+ Project-URL: Documentation, https://github.com/vinayak1729-web/QuantR#readme
13
+ Keywords: finance,trading,technical-analysis,indicators,quantitative
14
+ Classifier: Development Status :: 3 - Alpha
15
+ Classifier: Intended Audience :: Developers
16
+ Classifier: Intended Audience :: Financial and Insurance Industry
17
+ Classifier: Topic :: Office/Business :: Financial :: Investment
18
+ Classifier: Programming Language :: Python :: 3
19
+ Classifier: Programming Language :: Python :: 3.7
20
+ Classifier: Programming Language :: Python :: 3.8
21
+ Classifier: Programming Language :: Python :: 3.9
22
+ Classifier: Programming Language :: Python :: 3.10
23
+ Classifier: Programming Language :: Python :: 3.11
24
+ Classifier: License :: OSI Approved :: MIT License
25
+ Classifier: Operating System :: OS Independent
26
+ Requires-Python: >=3.7
27
+ Description-Content-Type: text/markdown
28
+ License-File: LICENSE
29
+ Requires-Dist: yfinance>=0.2.0
30
+ Requires-Dist: pandas>=1.3.0
31
+ Requires-Dist: matplotlib>=3.4.0
32
+ Provides-Extra: dev
33
+ Requires-Dist: pytest>=7.0; extra == "dev"
34
+ Requires-Dist: black>=22.0; extra == "dev"
35
+ Requires-Dist: flake8>=4.0; extra == "dev"
36
+ Requires-Dist: mypy>=0.950; extra == "dev"
37
+ Dynamic: author
38
+ Dynamic: home-page
39
+ Dynamic: license-file
40
+ Dynamic: requires-python
@@ -0,0 +1,12 @@
1
+ LICENSE
2
+ README.md
3
+ pyproject.toml
4
+ setup.py
5
+ QuantResearch/__init__.py
6
+ QuantResearch/indicators.py
7
+ QuantResearch/visualize.py
8
+ QuantResearch.egg-info/PKG-INFO
9
+ QuantResearch.egg-info/SOURCES.txt
10
+ QuantResearch.egg-info/dependency_links.txt
11
+ QuantResearch.egg-info/requires.txt
12
+ QuantResearch.egg-info/top_level.txt
@@ -0,0 +1,9 @@
1
+ yfinance>=0.2.0
2
+ pandas>=1.3.0
3
+ matplotlib>=3.4.0
4
+
5
+ [dev]
6
+ pytest>=7.0
7
+ black>=22.0
8
+ flake8>=4.0
9
+ mypy>=0.950
@@ -0,0 +1 @@
1
+ QuantResearch
File without changes
@@ -0,0 +1,66 @@
1
+ [build-system]
2
+ requires = ["setuptools>=45", "wheel", "setuptools_scm[toml]>=6.2"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "QuantResearch"
7
+ version = "0.0.1"
8
+ description = "Technical indicators and visualization tools for quantitative research"
9
+ readme = "README.md"
10
+ requires-python = ">=3.7"
11
+ license = {text = "MIT"}
12
+ authors = [
13
+ {name = "Vinayak Shinde", email = "vinayak.r.shinde.1729@gmail.com"}
14
+ ]
15
+ keywords = ["finance", "trading", "technical-analysis", "indicators", "quantitative"]
16
+ classifiers = [
17
+ "Development Status :: 3 - Alpha",
18
+ "Intended Audience :: Developers",
19
+ "Intended Audience :: Financial and Insurance Industry",
20
+ "Topic :: Office/Business :: Financial :: Investment",
21
+ "Programming Language :: Python :: 3",
22
+ "Programming Language :: Python :: 3.7",
23
+ "Programming Language :: Python :: 3.8",
24
+ "Programming Language :: Python :: 3.9",
25
+ "Programming Language :: Python :: 3.10",
26
+ "Programming Language :: Python :: 3.11",
27
+ "License :: OSI Approved :: MIT License",
28
+ "Operating System :: OS Independent",
29
+ ]
30
+
31
+ dependencies = [
32
+ "yfinance>=0.2.0",
33
+ "pandas>=1.3.0",
34
+ "matplotlib>=3.4.0",
35
+ ]
36
+
37
+ [project.optional-dependencies]
38
+ dev = [
39
+ "pytest>=7.0",
40
+ "black>=22.0",
41
+ "flake8>=4.0",
42
+ "mypy>=0.950",
43
+ ]
44
+
45
+ [project.urls]
46
+ Homepage = "https://github.com/vinayak1729-web/QuantR"
47
+ Repository = "https://github.com/vinayak1729-web/QuantR"
48
+ Issues = "https://github.com/vinayak1729-web/QuantR/issues"
49
+ Documentation = "https://github.com/vinayak1729-web/QuantR#readme"
50
+
51
+ [tool.setuptools]
52
+ packages = ["QuantResearch"]
53
+
54
+ [tool.setuptools.package-data]
55
+ QuantResearch = ["py.typed"]
56
+
57
+ [tool.black]
58
+ line-length = 88
59
+ target-version = ['py37', 'py38', 'py39', 'py310', 'py311']
60
+ include = '\.pyi?$'
61
+
62
+ [tool.pytest.ini_options]
63
+ testpaths = ["tests"]
64
+ python_files = ["test_*.py"]
65
+ python_classes = ["Test*"]
66
+ python_functions = ["test_*"]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,27 @@
1
+ from setuptools import setup, find_packages
2
+
3
+ with open("README.md", "r", encoding="utf-8") as fh:
4
+ long_description = fh.read()
5
+
6
+ setup(
7
+ name="QuantResearch",
8
+ version="0.0.1",
9
+ author="Vinayak Shinde",
10
+ author_email="vinayak.r.shinde.1729@gmail.com",
11
+ description="Technical indicators and visualization tools for quantitative research",
12
+ long_description=long_description,
13
+ long_description_content_type="text/markdown",
14
+ url="https://github.com/vinayak1729-web/QuantR",
15
+ packages=find_packages(),
16
+ classifiers=[
17
+ "Programming Language :: Python :: 3",
18
+ "License :: OSI Approved :: MIT License",
19
+ "Operating System :: OS Independent",
20
+ ],
21
+ python_requires=">=3.7",
22
+ install_requires=[
23
+ "yfinance>=0.2.0",
24
+ "pandas>=1.3.0",
25
+ "matplotlib>=3.4.0",
26
+ ],
27
+ )