Skip to main content

Generate synthetic time series data.

Project description

logo

Table of Contents
  1. About The Project
  2. Installation
  3. Getting Started
  4. Contributing
  5. License

About The Project

Introduction

Synthetica is a versatile and robust tool for generating synthetic time series data. Whether you are engaged in financial modeling, IoT data simulation, or any project requiring realistic time series data to create correlated or uncorrelated signals, Synthetica provides high-quality, customizable generated datasets. Leveraging advanced statistical techniques and machine learning algorithms, Synthetica produces synthetic data that closely replicates the characteristics and patterns of real-world data.

The project latest version incorporates a wide array of models, offering an extensive toolkit for generating synthetic time series data. This version includes features like:

  • GeometricBrownianMotion
  • AR (Auto Regressive)
  • NARMA (Non-Linear Auto Regressive Moving Average)
  • Heston
  • CIR (Cox–Ingersoll–Ross)
  • LevyStable
  • MeanReverting (Ornstein–Uhlenbeck)
  • Merton
  • Poisson
  • Seasonal

However, the SyntheticaAdvenced version elevates the capabilities further, integrating more sophisticated deep learning data-driven algorithms, such as TimeGAN.

(back to top)

Built With

  • numpy = "^1.26.4"
  • pandas = "^2.2.2"
  • scipy = "^1.13.1"

(back to top)

Installation

$ pip install python-synthetica

(back to top)

Getting Started

Once you have cloned the repository, you can start using Synthetica to generate synthetic time series data. Here are some initial steps to help you kickstart your exploration:

>>> import synthetica as sth

In this example, we are using the following parameters for illustration purposes:

  • length=252: The length of the time series
  • num_paths=5: The number of paths to generate
  • seed=123: Reseed the numpy singleton RandomState instance for reproduction

Initialize the model: Using the GeometricBrownianMotion (GBM) model: This approach initializes the model with a specified path length, number of paths, and a fixed random seed:

>>> model = sth.GeometricBrownianMotion(length=252, num_paths=5, seed=123)

Generate random signals: The transform method then generates the random signals accordingly:

>>> model.transform() # Generate random signals

chart-1

Generate correlated paths: This process ensures that the resulting features are highly positively correlated, leveraging the Cholesky decomposition method to achieve the desired matrix correlation structure:

>>> model.transform(matrix) # Produces highly positively correlated features

chart-2

(back to top)

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(back to top)

License

Distributed under the BSD-3 License. See LICENSE.txt for more information.

(back to top)

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

python_synthetica-0.1.1.tar.gz (16.0 kB view hashes)

Uploaded Source

Built Distribution

python_synthetica-0.1.1-py3-none-any.whl (16.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page