Skip to content

how to integrate timescale and large time models (foundation time series models) and grafana. (built streaming on twitch)

License

Notifications You must be signed in to change notification settings

AzulGarza/timescale-and-large-time-models

Repository files navigation

forecasting stock-trade data using timescale and large time models

how to integrate large time models into timescale database

this project demonstrates how to integrate forecasts into a Timescale database, using TimeGPT.

set up env

pip install uv
uv venv --python 3.10
source .venv/bin/activate
uv pip install -e .
pre-commit install

set up timescale

Tip

when you create a timescale service, you can download the psql config file. also, you will be provided with a psql command such ass psql -d <your project id>. that's your project id.

finance tutorial part 1: loading and forecasting data on demand

this process follows the timescale documentation

  1. create a service on timescale
  2. save your credentials in the psql config file ~/.pg_service.conf
  3. download the data and populate timescale using
make populate_timescale project_id=<your project id>
make create_materialized_view project_id=<your project id>
make create_forecasts_table project_id=<your project id>
  1. forecast!
python forecast --h <your horizon>

finance tutorial part 2: loading and forecasting real time data

this process follows the timescale documentation

  1. create a service on timescale
  2. save your credentials in the psql config file ~/.pg_service.conf
make create_twelvedata_table project_id=<your project id>
make create_m_view_twelvedata project_id=<your project id>
make create_f_table_twelvedata project_id=<your project id>
  1. collect real time data, ingest it to timescale and forecast it in real time!
python forecast/real_time.py

About

how to integrate timescale and large time models (foundation time series models) and grafana. (built streaming on twitch)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published