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, orvalidation).
- Fetches data from the server based on the type (
-
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.
display_results(backtest_results: results as above, validation_dataframe: dataFrame, indicators: list of indicators to show e.g. used for entry by strategy )- Displays results of a backtest in a readable format with entry, exit prices, p/l etc.
-
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
Release history Release notifications | RSS feed
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.2.5.tar.gz
(27.0 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
numin-1.2.5-py3-none-any.whl
(29.3 kB
view details)
File details
Details for the file numin-1.2.5.tar.gz.
File metadata
- Download URL: numin-1.2.5.tar.gz
- Upload date:
- Size: 27.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a88110734c2ecb858e9f4e01b27422c5fb8889fc07ec8e6147471a1e35698889
|
|
| MD5 |
7b327f0694f42af1df3fd5101c8ba5d6
|
|
| BLAKE2b-256 |
a8cbb82ec3fd206fb4da33b167600713b49f52c514233ab27576deed9ff9be37
|
File details
Details for the file numin-1.2.5-py3-none-any.whl.
File metadata
- Download URL: numin-1.2.5-py3-none-any.whl
- Upload date:
- Size: 29.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6b8dcc90a5ba68610c2507633274fd91b72728eff814fb6db2a2cc00af8b7d2a
|
|
| MD5 |
1f565bf041274cb95abd4f461ad64470
|
|
| BLAKE2b-256 |
737f8f35ef93d9f5b1b736a5079193084bebf518e55ae656e8e0d26ff9ad9027
|