Skip to main content

numin package

Project description

numin2 Package

numin2 is a Python package designed for algorithmic trading and backtesting providing an API called Numin2API.

numin (v1) is out of service as of Dec 2025

numin2 is under development; features available are documented below

Features

  • Data Retrieval: Download training, round, and validation data.
  • Prediction Submission: TBD
  • Real-Time Round Management: TBD
  • Backtesting: Backtesting cross-sectional predictions vs targets for Nifty50
  • File Management: TBD
  • Returns Summary: TBD

Supported Methods

  • Data Download:

    • get_data_for_month(self,year,month,batch_size=4,window_size=100,target_type='rank'):

    • Returns a torch dataloader for the given year and month of Nifty 50 or n returns

    • Dimension of each day is 100,n. Returns tensor of shape batch_size,window_size,n for features. Default n=50. (Later n will be a parameter).

    • Targets are next day returns / ranked returns of shape batch_size,n

    • download_data(outfile,type='daily',features='returns')

    • Download data for a given type and features

    • type can be 'daily','intraday'

    • features can be 'returns' (close returns),'open_close' (open-close returns), or 'ohlcv'

    • outfile is the name of the parquet file to save the data

    • get_range_dataloader(data_path: str, start_year: int, start_month: int, end_year: int, end_month: int, batch_size: int = 32, window_size: int = 100, target_type: str = 'raw', top_k: int = 10)

    • Returns a torch dataloader for the given range of years and months of Nifty 50 or n returns

    • Dimension of each day is 100,n. Returns tensor of shape batch_size,window_size,n for features. Default n=50. (Later n will be a parameter).

    • Targets are next day returns / ranked returns of shape batch_size,n

    • get_dataloader(data_path: str, batch_size: int = 32, window_size: int = 100, target_type: str = 'raw', top_k: int = 10)

    • Returns a torch dataloader for the given range of years and months of Nifty 50 or n returns

    • Dimension of each day is 100,n. Returns tensor of shape batch_size,window_size,n for features. Default n=50. (Later n will be a parameter).

    • Targets are next day returns / ranked returns of shape batch_size,n

  • Backytesting

    • backtest_positions(positions,targets)
    • Taks a batch of positions for 50 stocks
    • Returns a dict such as {'daily_pnl','total_profit','sharpe_ratio,'mean_daily_return'}

Installation

Install numin2 using pip:

pip install numin2

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

numin2-1.0.3.tar.gz (8.6 kB view details)

Uploaded Source

Built Distribution

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

numin2-1.0.3-py3-none-any.whl (8.5 kB view details)

Uploaded Python 3

File details

Details for the file numin2-1.0.3.tar.gz.

File metadata

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

File hashes

Hashes for numin2-1.0.3.tar.gz
Algorithm Hash digest
SHA256 7d954ae95cb4c695265f4780cd9ab71a147d66ba2dd92911a684375ffd5b415d
MD5 d04c23a0dcaccba3086cb854602772bd
BLAKE2b-256 b20c47ae157425d344056a92f1414d5c04a72105fa339549d61c3c10bb05277f

See more details on using hashes here.

File details

Details for the file numin2-1.0.3-py3-none-any.whl.

File metadata

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

File hashes

Hashes for numin2-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 f52af6cf06cbd010b09e90eb6f14658aa854a613162e3ba9938d217860822701
MD5 d96a0d7b835b0a4d6e52b6fab2724265
BLAKE2b-256 387a244e193ad9c6c1623a11a9508b422fc5a864762a9b1d4822111b2d3ae285

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