"""Factor market system for OpenClaw Trading.

This module provides the factor infrastructure including:
- Factor abstract base classes (BuyFactor, SellFactor, SelectFactor)
- Factor types and data classes
- Basic factors (free)
- Advanced factors (paid)
- Factor store for purchasing and managing factors

Example:
    >>> from openclaw.factor import FactorStore, MovingAverageCrossoverFactor
    >>>
    >>> # Create factor store for an agent
    >>> store = FactorStore(agent_id="trader_001", tracker=tracker)
    >>>
    >>> # List available factors
    >>> store.list_available()
    >>>
    >>> # Purchase a factor
    >>> store.purchase("buy_ma_crossover")
    >>>
    >>> # Use purchased factor
    >>> factor = store.get_factor("buy_ma_crossover")
    >>> result = factor.evaluate(context)
"""

# Base classes
from openclaw.factor.base import BuyFactor, Factor, SellFactor, SelectFactor

# Types
from openclaw.factor.types import (
    FactorCategory,
    FactorContext,
    FactorInventoryItem,
    FactorMetadata,
    FactorResult,
    FactorSignal,
    FactorType,
    PurchaseRecord,
)

# Basic factors (free)
from openclaw.factor.basic import (
    BollingerBandBreakoutFactor,
    MACDCrossoverFactor,
    MovingAverageCrossoverFactor,
    RSIOversoldFactor,
)

# Advanced factors (paid)
from openclaw.factor.advanced import (
    MachineLearningFactor,
    MultiFactorCombination,
    SentimentMomentumFactor,
)

# Store
from openclaw.factor.store import FactorStore

__all__ = [
    # Base classes
    "Factor",
    "BuyFactor",
    "SellFactor",
    "SelectFactor",
    # Types
    "FactorType",
    "FactorCategory",
    "FactorSignal",
    "FactorResult",
    "FactorContext",
    "FactorMetadata",
    "PurchaseRecord",
    "FactorInventoryItem",
    # Basic factors
    "MovingAverageCrossoverFactor",
    "RSIOversoldFactor",
    "MACDCrossoverFactor",
    "BollingerBandBreakoutFactor",
    # Advanced factors
    "MachineLearningFactor",
    "SentimentMomentumFactor",
    "MultiFactorCombination",
    # Store
    "FactorStore",
]
