Skip to main content

numin package

Project description

numin Package

numin is a Python package designed for algorithmic trading and backtesting providing an API called NuminAPI.

Features

  • Data Retrieval: Download training, round, and validation data.
  • Prediction Submission: Upload prediction CSVs to the server with built-in validation.
  • Real-Time Round Management: Fetch the current trading round from the server.
  • Backtesting: Run backtests on user-defined strategies with support for additional features and discretization.
  • File Management: Upload and deploy files via Anvil's server.
  • Returns Summary: Retrieve and format live (or simulation) trading returns.

Supported Methods

  • Data Download:

    • get_data(data_type: str)
      • Fetches data from the server based on the type (training, round, or validation).
  • Prediction Submission:

    • submit_predictions(file_path: str)
      • Submits a CSV file of predictions to the server.
      • Note: The file must include mandatory columns ["id", "predictions", "round_no"] and optional columns ["stop", "target", "tLimit"] (if provided, they must be integers between 1 and 100).
  • Round and Validation Data:

    • get_current_round()
      • Retrieves the current round number from the server.
    • fetch_validation_data(date: str)
      • Downloads validation data for a given date.
    • get_validation_dates()
      • Lists available validation dates on the server.
  • Backtesting:

    • run_backtest(user_strategy : str, date:str, val_data:str, result_type="results" or "returns")
      • Executes a backtest using a user-provided strategy function on the given date.
  • File Upload and Deployment:

    • upload_file(file, user_id, filename)
      • Uploads a file to remote storage via the Anvil server.
    • deploy_file(filename: str, user_id: str)
      • Deploys a file for a given user.
  • Live Returns Summary:

    • show_returns(user_id, mode="live"/"sim")
      • Retrieves and displays a formatted summary of returns for the strategy associated with the given user ID

Installation

Install numin using pip:

pip install numin

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

numin-1.1.0.tar.gz (26.8 kB view details)

Uploaded Source

Built Distribution

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

numin-1.1.0-py3-none-any.whl (28.4 kB view details)

Uploaded Python 3

File details

Details for the file numin-1.1.0.tar.gz.

File metadata

  • Download URL: numin-1.1.0.tar.gz
  • Upload date:
  • Size: 26.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.14

File hashes

Hashes for numin-1.1.0.tar.gz
Algorithm Hash digest
SHA256 8f85c3472393df8188304ee64f084c7ebce6fea072c084f03cc81b1037ad9526
MD5 e10843045c35039df41a8305badc8331
BLAKE2b-256 c7642edf0d3949df4420ac892fff9066dba449c00af46a2d8b4c805e2716cec5

See more details on using hashes here.

File details

Details for the file numin-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: numin-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 28.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.14

File hashes

Hashes for numin-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7bfdac3890bd53c8b6a3b9dfae1285bc017d22a8960f44fe21d200f2b8027a9b
MD5 672f393ae63bea165b6c295bdc2f36a1
BLAKE2b-256 60ebb82a18b1d1d6da4b611514a47c4f84443e7fbc3f05d1eb188a03bd228a40

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