Skip to main content

Terminal tool to plot stocks, crypto, pair ratios, and technical indicators like MACD and RSI.

Project description

NVDA stock price, moving averages and volume over 1 year

Tsigna

Tsigna is a Python financial analysis tool that runs entirely in the terminal. It is most useful for medium-term trading. It fetches historical stock data from Yahoo Finance, calculates technical indicators including moving averages, MACD, and RSI, and displays them as text-based charts using the plotille library. The tool supports single ticker analysis, ratio comparisons between two tickers, and a special MMRI calculation. Users can customize the time period and split the terminal display to show multiple indicators simultaneously.

NVDA stock price, Bollinger Bands and Stochastics over 1 year

Background

Originally I was looking for a free online tool to plot the ratio between two tickers, but I didn't find such a tool so I started working on Tsigna. The name comes from 'T' for terminal and the plural form of signum, the latin word for signal. The 'T' also stands for technical, like in technical indicators, from which we get technical signals.

Ratio between NVDA and WMT stock prices, moving averages and RSI indicator over 2 years

Dependencies

Tsigna requires the following external libraries:

  • pandas: Used for data manipulation and analysis.
  • plotille: Used for creating terminal-based plots.
  • yahooquery: Used for fetching financial data from Yahoo Finance.

These libraries and their sub-dependencies will be installed automatically when you install Tsigna.

Installation

It is recommended to install Tsigna within a virtual environment to avoid conflicts with system packages. Some Linux distributions enforce this. You can use pipx to handle the virtual environment automatically, or create one manually and use pip.

Installation with pipx

pipx installs Tsigna in an isolated environment and makes it available globally.

1. Install pipx:

  • Linux (Debian / Ubuntu / Mint):

    sudo apt install pipx
    pipx ensurepath
    
  • Linux (Other) / macOS:

    python3 -m pip install --user pipx
    python3 -m pipx ensurepath
    
  • Windows:

    python -m pip install --user pipx
    python -m pipx ensurepath
    

You may need to close and restart your terminal for the PATH changes to take effect.

2. Install Tsigna:

pipx install tsigna

Installation with pip

If you prefer to manage the virtual environment manually, you can create and activate it by following this tutorial. Then install Tsigna:

pip install tsigna

Usage

Basic Usage

tsigna [arguments] [TICKER1] [TICKER2]

Command-Line Arguments

Argument Short Flag Description
--help -h Show help message
--atr -a Display ATR indicator (Average True Range)
--atr-only -A Display only ATR indicator
--bollinger -b Display Bollinger Bands indicator
--mfi -f Display MFI indicator (Money Flow Index)
--mfi-only -F Display only MFI indicator
--indicator-info -i Show indicator information
--macd -m Display MACD indicator (Moving Average Convergence Divergence)
--macd-only -M Display only MACD indicator
--no-cache -n Bypass cache and get latest data
--obv -o Display OBV indicator (On-Balance Volume)
--obv-only -O Display only OBV indicator
--rsi -r Display RSI indicator (Relative Strength Index)
--rsi-only -R Display only RSI indicator
--stoch -s Display Stochastics indicator
--stoch-only -S Display only Stochastics indicator
--version -v Show program's version number and exit
--volume -w Display volume
--volume-only -W Display only volume
--years -y Set years to plot, use 0 for ytd (default: 1)

Not Financial Advice

I do not own any of the stocks in the examples, I chose them because they are very popular.

License

Copyright (c) 2025 Monsieur Linux

This project is licensed under the MIT License. See the LICENSE file for details.

Acknowledgements

Tsigna is not doing much more than getting data from yahooquery, processing it with pandas, and plotting it with plotille, so thanks to the creators and contributors of these powerful libraries for making it possible.

Thanks also to the ticker tool, which is very useful to track prices in real time from the terminal.

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

tsigna-0.2.0.tar.gz (768.3 kB view details)

Uploaded Source

Built Distribution

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

tsigna-0.2.0-py3-none-any.whl (13.4 kB view details)

Uploaded Python 3

File details

Details for the file tsigna-0.2.0.tar.gz.

File metadata

  • Download URL: tsigna-0.2.0.tar.gz
  • Upload date:
  • Size: 768.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.2

File hashes

Hashes for tsigna-0.2.0.tar.gz
Algorithm Hash digest
SHA256 4c5bad636e4a53d3f2608386f9542a9216e4d0c7651fd4cf7b0f69119216a2a7
MD5 8eb873e9f7c2e047fc7e8c7586c6cd21
BLAKE2b-256 06e21e01b626df834a5b800e44c955383aae000f5292502826f4ed1b609f4fb0

See more details on using hashes here.

File details

Details for the file tsigna-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: tsigna-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 13.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.2

File hashes

Hashes for tsigna-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 400274b7ead23e0970c7b088d00fee59f567090c84a2483fd1edca83671a8958
MD5 aff1a95255941ddd0d0c50fb9edeb0fc
BLAKE2b-256 ea256c95b91923180fcef2d15d9043197db0fd2a4150d0f4677fd8c03cca049f

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