H

High-Frequency Market Predictor

DRAFT
FINANCE
Time Series
Model Description

Predicts short-term price movement from tick data

License:

Decentralized

Generally available API for a market price using decentralized token economics.

Learn more about this license
Performance Metrics

Metric Type

Sharpe Ratio

Current Baseline

2.4

Tokens per DeltaOne

1,000 hHMP

Est. Value per DeltaOne

AMM not deployed

Next step: register your model to create a new token and reward data contributions

Follow these steps to register your model with the Hokusai ML Platform SDK

Step 1: Install Hokusai ML Platform SDK

Install the SDK using pip:

pip install git+https://github.com/Hokusai-protocol/hokusai-data-pipeline.git#subdirectory=hokusai-ml-platform

Step 2: Set up your environment

Configure your Hokusai API key (this authenticates both Hokusai and MLflow):

export HOKUSAI_API_KEY="your-hokusai-api-key-here"

Verify your setup:

from hokusai.core import ModelRegistry
import os

# Verify API key is set
if not os.getenv("HOKUSAI_API_KEY"):
    raise ValueError("Please set HOKUSAI_API_KEY environment variable")

# This should not raise any errors
registry = ModelRegistry()
print("✅ Hokusai ML Platform installed successfully!")

Step 3: Register your model

Use this code to register your model with Hokusai:

import os
import mlflow
from hokusai.core import ModelRegistry

# Set up MLflow tracking URI
mlflow.set_tracking_uri("https://registry.hokus.ai/api/mlflow")

# IMPORTANT: Use your Hokusai API key, NOT an MLflow token
# The Hokusai API key authenticates both the registry and MLflow
os.environ["MLFLOW_TRACKING_TOKEN"] = os.getenv("HOKUSAI_API_KEY")

# Initialize registry
registry = ModelRegistry()

# Register your model
with mlflow.start_run() as run:
    # Log your model (replace with your actual model)
    mlflow.sklearn.log_model(
        your_trained_model, 
        "model",
        registered_model_name="High-Frequency Market Predictor"
    )
    
    # Register with Hokusai
    model_uri = f"runs:/{run.info.run_id}/model"
    registered_model = registry.register_tokenized_model(
        model_uri=model_uri,
        model_name="High-Frequency Market Predictor",  # Changed from 'name'
        token_id="hHMP",  # Can be uppercase or lowercase
        metric_name="accuracy",  # Changed from 'benchmark_metric'
        baseline_value=0.92,  # Changed from 'benchmark_value' (now a float)
        additional_tags={"author": "your-name", "version": "1.0"}  # Changed from 'tags'
    )
    
    print(f"✅ Model registered successfully: {registered_model.name}")

Parameters:

  • model_uri: Path to the MLflow model (e.g., "runs:/abc123/model")
  • model_name: Name for the registered model
  • token_id: Unique token identifier (normalized to uppercase)
  • metric_name: Performance metric name (e.g., "accuracy", "f1_score")
  • baseline_value: Baseline performance value (numeric float)
  • additional_tags: Optional metadata dictionary