Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

quantsumore Logo

quantsumore — retired


Project status: retired

The repository and its published packages remain available as historical references. See ARCHIVED.md for the retirement policy and guidance for forks.


quantsumore is an API client that enables access to data from various sources.

🔴 Note the following critical information:


Important Information

👉 quantsumore is an independent Python library designed to provide users with access to market data across various financial instruments. The library is not associated with, endorsed by, or affiliated with any financial institutions or data providers. All data accessed through quantsumore is owned and disseminated by respective data providers.

Users are advised to independently verify the accuracy of the data obtained via quantsumore and should base investment decisions on their own judgment supplemented by professional advice. The developers of quantsumore disclaim all responsibility for any inaccuracies, errors, or omissions in the data provided.


No Warranty

👉 quantsumore is provided "as is", without warranty of any kind, express or implied. No warranties are made concerning the merchantability, fitness for a particular purpose, or non-infringement of the data. In no event shall the authors or copyright holders be liable for any claim, damages, or other liability, whether in an action of contract, tort or otherwise, arising from, out of, or in connection with the software or the use or other dealings in the software.


Personal Use

👉 Please note that the APIs are intended primarily for personal and non-commercial use. Users should refer to the individual terms of use for guidelines on commercial applications.

Summary of the quantsumore Library

The quantsumore library is a comprehensive Python package designed for retrieving and analyzing a wide range of financial market data. It provides specialized API clients to fetch data from various financial markets, including cryptocurrencies, equities, Forex, Treasury instruments, and Consumer Price Index (CPI) metrics. Below is an overview of the key API clients and their functionalities.

Table of Contents

Installation

Installing the quantsumore Package

The final archival PyPI release can be installed explicitly:

pip install quantsumore==3.0.0b2

This release is unsupported and exists to preserve the final source state and surface the retirement notice. No additional releases are planned.

Using the quantsumore API Clients

Cryptocurrency Data

The crypto API client allows users to easily fetch both real-time and historical cryptocurrency market data.

Importing the Cryptocurrency API Client

from quantsumore.api import crypto

Fetching Latest Cryptocurrency Data

# Fetch the latest market data for Bitcoin in USD from Binance
latest_data = crypto.Latest(slug="bitcoin", baseCurrencySymbol="USD", quoteCurrencySymbol="JPY", cryptoExchange="binance", limit=100, exchangeType="all")
print(latest_data)

Fetching Historical Cryptocurrency Data

# Fetch historical data for Bitcoin from January 1, 2024, to January 10, 2024
historical_data = crypto.Historical(slug="bitcoin", start="2024-01-01", end="2024-01-10")
print(historical_data)

Consumer Price Index (CPI)

The cpi API client allows users to fetch CPI data for all urban consumers and perform inflation adjustments.

Importing the CPI API Client

from quantsumore.api import cpi

Accessing CPI Data

# Access CPI data for all urban consumers
cpi_data = cpi.CPI_U.InflationAdjustment.data
print(cpi_data)

Performing Inflation Adjustments

# Adjust $100 from the year 2000 to its equivalent in 2024
adjusted_value = cpi.CPI_U.InflationAdjustment.select(original_amount=100, original_year=2000, target_year=2024, month_input="July")
print(f"Adjusted value: ${adjusted_value}")

Equity and Stock Data

The equity API client provides users with tools to fetch company information, financial stats, and both real-time and historical stock price data.

Importing the Equity API Client

from quantsumore.api import equity

Fetching Company Information

# Fetch company bio for Apple Inc.
company_bio = equity.Profile.bio(ticker="AAPL")
print(company_bio)

Fetching Latest Stock Price

# Fetch the latest stock price for Apple Inc.
latest_price = equity.Latest(ticker="AAPL")
print(f"Latest stock price for AAPL: {latest_price}")

Fetching Historical Stock Price Data

# Fetch historical stock price data for Apple from January 1, 2024, to January 10, 2024
historical_data = equity.Historical(ticker="AAPL", start="2024-01-01", end="2024-01-10")
print(historical_data)

Forex Data

The forex API client allows users to fetch Forex-related data, including exchange rates, currency conversions, and interbank rates.

Importing the Forex API Client

from quantsumore.api import forex

Currency Conversion

# Convert 100 Euros to USD based on the latest conversion rates
conversion_data = forex.CurrencyConversion(currency_pair="EURUSD", conversion_amount=100)
print(conversion_data)

Fetching Historical Exchange Rates

# Fetch historical exchange rates for EUR/USD from January 1, 2024, to January 10, 2024
historical_data = forex.Historical(currency_pair="EURUSD", start="2024-01-01", end="2024-01-10")
print(historical_data)

Treasury Data

The treasury API client enables users to fetch U.S. Treasury-related data, including bill rates and yield curves.

Importing the Treasury API Client

from quantsumore.api import treasury

Fetching Treasury Bill Rates

# Fetch the latest Treasury bill rates for the current year
tbill_rates = treasury.TBill(period="CY")
print(tbill_rates)

Fetching Daily Treasury Yield Curve Rates

# Fetch the latest yield curve rates for the year 2023
yield_rates = treasury.Yield(period=2023)
print(yield_rates)

Introduction to Financial Analysis

The fAnalysis and tAnalysis classes, provided by the quantsumore library, offer comprehensive tools for conducting both fundamental and technical analysis of financial data. These modules allow users to explore a company's financial health through statements and ratios (fundamental analysis) and detect market trends, potential buy/sell signals, and volatility through technical indicators (technical analysis).

This guide will show you how to:

  • Access financial statements, ratios, and common size financial statements.
  • Compute technical indicators such as RSI, MACD, DMI, and Bollinger Bands.

Setting Up Financial and Technical Analysis

Importing and Initializing fAnalysis (Fundamental Analysis)

from quantsumore.analysis import fAnalysis

Importing and Initializing tAnalysis (Technical Analysis)

Next, initialize the tAnalysis class with your financial data for technical analysis:

import pandas as pd
import numpy as np
from quantsumore.analysis import tAnalysis

# Sample data setup
data = pd.DataFrame({
    'Date': pd.date_range(start='2020-01-01', periods=100),
    'High': np.random.rand(100) * 100 + 150,
    'Low': np.random.rand(100) * 100 + 100,
    'Open': np.random.rand(100) * 100 + 125,
    'Close': np.random.rand(100) * 100 + 130,
    'Volume': np.random.randint(100, 1000, size=100),
    'Symbol': ['AAPL'] * 100
})

# Initialize the tAnalysis class
analyze = tAnalysis(data)

Using Financial Statements, Ratios, and Indicators

Overview of Methods and Indicators

Fundamental Analysis with fAnalysis

fAnalysis provides a wide range of methods for accessing and analyzing financial data:

  • Financial Statements: Income statement, balance sheet, cash flow statement.
  • Liquidity Ratios: Current ratio, quick ratio, cash ratio.
  • Solvency Ratios: Debt-to-equity ratio, debt-to-capital ratio.
  • Profitability Indicators: Net profit margin, gross profit margin, operating profit margin.
  • Efficiency Ratios: Inventory turnover ratio, receivables turnover ratio.
  • Common Size Statements: Convert statements into common-size formats for easier comparison.
Technical Analysis with tAnalysis

tAnalysis offers methods to compute various technical indicators:

  • Directional Movement Index (DMI) & Average Directional Index (ADX): Trend strength indicators.
  • Aroon Indicator: Trend detection.
  • On Balance Volume (OBV): Volume analysis for price movements.
  • Accumulation/Distribution Line (A/D Line): Volume and price trends.
  • MACD: Momentum and trend-following indicator.
  • RSI: Overbought/oversold conditions.
  • Stochastic Oscillator: Market momentum and sensitivity.
  • Moving Averages & Bollinger Bands: Trend analysis and volatility bands.
  • ATR: Volatility measure.

Examples of Financial and Technical Analysis Applications

Fundamental Analysis Examples

Accessing Financial Statements
# Fetch financial data for a specific ticker and period
fAnalysis('AAPL', 'Q')

# Access the balance sheet and income statement
income_statement = fAnalysis.income_statement
balance_sheet = fAnalysis.balance_sheet
Calculating Financial Ratios
# Calculate key financial ratios
current_ratio = fAnalysis.current_ratio()
debt_to_equity_ratio = fAnalysis.debt_to_equity_ratio()

print(f"Current Ratio: {current_ratio}")
print(f"Debt to Equity Ratio: {debt_to_equity_ratio}")
Dividend Analysis
# Access dividend data if available
dividend_yield = fAnalysis.dividend_yield()
print(f"Dividend Yield: {dividend_yield}")
Generating Common Size Financial Statements
# Convert the income statement to a common size statement
common_size_income = fAnalysis.CommonSize("Income Statement")
print(common_size_income)

Technical Analysis Examples

Computing and Visualizing DMI and ADX
# Compute DMI and ADX
dmi = analyze.DirectionalMovementIndex(period=14, adx_threshold=25)
dmi.plot_indicators()
Using the Aroon Indicator
# Compute Aroon and plot
aroon = analyze.AroonIndicator(period=25)
aroon.plot_aroon()
Evaluating Market Volume with OBV
# Compute On Balance Volume and detect divergences
obv = analyze.OnBalanceVolume()
obv.plot_obv_with_divergence()
Analyzing Price and Volume with the Accumulation/Distribution Line
# Compute A/D Line and plot
adl = analyze.AccumulationDistributionLine()
adl.plot_ad_line_with_divergence()
MACD for Trend Following
# Compute MACD and visualize
macd = analyze.MACD()
macd.plot_macd()
Identifying Overbought or Oversold Conditions with RSI
# Compute RSI and plot
rsi = analyze.RelativeStrengthIndex()
rsi.plot_rsi()
Fast Stochastic Oscillator for Sensitivity to Market Movements
# Compute Stochastic Oscillator
stochastic = analyze.FastStochasticOscillator()
stochastic.plot_stochastic()
Combining Moving Averages and Bollinger Bands for Trend Analysis
# Compute and plot SMA, EMA, and Bollinger Bands
mabb = analyze.MovingAveragesAndBollingerBands()
mabb.plot_indicators()
Using ATR to Assess Market Volatility
# Compute ATR and visualize
atr = analyze.AverageTrueRange()
atr.plot_atr()

Metadata

Release files for quantsumore 3.0.0b2

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

Source distribution (sdist)

Source distribution for quantsumore 3.0.0b2
File Size Uploaded Provenance Actions
quantsumore-3.0.0b2.tar.gz 3.0 MB Without provenance Details for quantsumore-3.0.0b2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for quantsumore 3.0.0b2
File Interpreter ABI Platform Actions
quantsumore-3.0.0b2-py3-none-any.whl Python 3 none any Details for quantsumore-3.0.0b2-py3-none-any.whl

Total release size: 6.2 MB

Release files / quantsumore-3.0.0b2.tar.gz

Download URL quantsumore-3.0.0b2.tar.gz
Size 3.0 MB
Tags Source
SHA-256 checksum
How to use checksums
6c4d1391894f45827d8d522200e19aa91e8867381c1c5a6ebe6c16518757c2d4
BLAKE2b-256 checksum
How to use checksums
fe3889ddcd91beb116d4184db7ca55c98d9911b6896361fcb0013a75dcc59235
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.8.5

Release files / quantsumore-3.0.0b2-py3-none-any.whl

Download URL quantsumore-3.0.0b2-py3-none-any.whl
Size 3.2 MB
Tags Python 3
SHA-256 checksum
How to use checksums
d06298b786caf041deef29669700d83ef9c9ebb016096e05dad0c7b55e98efe1
BLAKE2b-256 checksum
How to use checksums
adb41486d8b38831a0f1e5a998aa6d10d62bfa9bd763ab3b67d08d1c2d9f73c0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.8.5

Security for quantsumore 3.0.0b2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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