handler

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 30, 2026 License: Apache-2.0 Imports: 34 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BackfillDailyRequest

type BackfillDailyRequest struct {
	ProviderID     provider.ProviderID
	PreferProvider provider.ProviderID
	Market         provider.Market
	SecurityType   provider.SecurityType
	From           string
	To             string
	Workers        int
	Progress       io.Writer
}

type Backtest

type Backtest struct {
	// contains filtered or unexported fields
}

func NewBacktest

func NewBacktest(service backtestservice.Service) Backtest

func (Backtest) CompareEvaluation

func (Backtest) InspectEvaluation

func (Backtest) InspectRun

func (Backtest) ListEvaluations

func (Backtest) ListRuns

func (Backtest) RankEvaluation

func (Backtest) Run

func (Backtest) RunEvaluation

func (Backtest) Validate

func (Backtest) ValidateEvaluation

type BacktestEquityRow

type BacktestEquityRow struct {
	Time           string  `json:"time" csv:"time"`
	Cash           float64 `json:"cash" csv:"cash"`
	PositionsValue float64 `json:"positions_value" csv:"positions_value"`
	Equity         float64 `json:"equity" csv:"equity"`
}

type BacktestEventRow

type BacktestEventRow struct {
	Time        string  `json:"time,omitempty" csv:"time"`
	Layer       string  `json:"layer" csv:"layer"`
	Type        string  `json:"type" csv:"type"`
	Symbol      string  `json:"symbol,omitempty" csv:"symbol"`
	Side        string  `json:"side,omitempty" csv:"side"`
	Reason      string  `json:"reason" csv:"reason"`
	Timeframe   string  `json:"timeframe,omitempty" csv:"timeframe"`
	Session     string  `json:"session,omitempty" csv:"session"`
	Status      string  `json:"status,omitempty" csv:"status"`
	Quantity    float64 `json:"quantity,omitempty" csv:"quantity"`
	Price       float64 `json:"price,omitempty" csv:"price"`
	Notional    float64 `json:"notional,omitempty" csv:"notional"`
	Commission  float64 `json:"commission,omitempty" csv:"commission"`
	Tax         float64 `json:"tax,omitempty" csv:"tax"`
	ExchangeFee float64 `json:"exchange_fee,omitempty" csv:"exchange_fee"`
	TotalCost   float64 `json:"total_cost,omitempty" csv:"total_cost"`
	SlippageBps float64 `json:"slippage_bps,omitempty" csv:"slippage_bps"`
}

type BacktestFillRow

type BacktestFillRow struct {
	Time        string  `json:"time" csv:"time"`
	Type        string  `json:"type" csv:"type"`
	Symbol      string  `json:"symbol" csv:"symbol"`
	Side        string  `json:"side" csv:"side"`
	Quantity    float64 `json:"quantity" csv:"quantity"`
	Price       float64 `json:"price" csv:"price"`
	Notional    float64 `json:"notional" csv:"notional"`
	Commission  float64 `json:"commission" csv:"commission"`
	Tax         float64 `json:"tax" csv:"tax"`
	ExchangeFee float64 `json:"exchange_fee" csv:"exchange_fee"`
	TotalCost   float64 `json:"total_cost" csv:"total_cost"`
	SlippageBps float64 `json:"slippage_bps" csv:"slippage_bps"`
	Reason      string  `json:"reason" csv:"reason"`
}

type BacktestMetricRow

type BacktestMetricRow struct {
	Metric string  `json:"metric" csv:"metric"`
	Value  float64 `json:"value" csv:"value"`
}

type BacktestOrderRow

type BacktestOrderRow struct {
	Time     string  `json:"time" csv:"time"`
	Symbol   string  `json:"symbol" csv:"symbol"`
	Side     string  `json:"side" csv:"side"`
	Amount   float64 `json:"amount" csv:"amount"`
	Quantity float64 `json:"quantity" csv:"quantity"`
	Reason   string  `json:"reason" csv:"reason"`
}

type BacktestPositionRow

type BacktestPositionRow struct {
	Symbol      string  `json:"symbol" csv:"symbol"`
	Quantity    float64 `json:"quantity" csv:"quantity"`
	AvgPrice    float64 `json:"avg_price" csv:"avg_price"`
	MarketPrice float64 `json:"market_price" csv:"market_price"`
	MarketValue float64 `json:"market_value" csv:"market_value"`
	WeightPct   float64 `json:"weight_pct" csv:"weight_pct"`
	EntryTime   string  `json:"entry_time,omitempty" csv:"entry_time"`
}

type BacktestRunComparisonOutput

type BacktestRunComparisonOutput struct {
	Result backtestservice.BacktestRunComparison
}

func (BacktestRunComparisonOutput) CSVRows

func (o BacktestRunComparisonOutput) CSVRows() any

func (BacktestRunComparisonOutput) JSONValue

func (o BacktestRunComparisonOutput) JSONValue() any

func (BacktestRunComparisonOutput) NDJSONRows

func (o BacktestRunComparisonOutput) NDJSONRows() any

func (BacktestRunComparisonOutput) TableRows

func (o BacktestRunComparisonOutput) TableRows() ([]string, [][]string)

type BacktestRunListOutput

type BacktestRunListOutput []backtestservice.SavedBacktestRun

func (BacktestRunListOutput) CSVRows

func (o BacktestRunListOutput) CSVRows() any

func (BacktestRunListOutput) JSONValue

func (o BacktestRunListOutput) JSONValue() any

func (BacktestRunListOutput) NDJSONRows

func (o BacktestRunListOutput) NDJSONRows() any

func (BacktestRunListOutput) TableRows

func (o BacktestRunListOutput) TableRows() ([]string, [][]string)

type BacktestRunOutput

type BacktestRunOutput struct {
	Result   core.Result
	SavedRun *backtestservice.SavedBacktestRun
	View     string
}

func (BacktestRunOutput) CSVRows

func (o BacktestRunOutput) CSVRows() any

func (BacktestRunOutput) JSONValue

func (o BacktestRunOutput) JSONValue() any

func (BacktestRunOutput) NDJSONRows

func (o BacktestRunOutput) NDJSONRows() any

func (BacktestRunOutput) TableRows

func (o BacktestRunOutput) TableRows() ([]string, [][]string)

type BacktestRunSummaryView

type BacktestRunSummaryView struct {
	ID              string                    `json:"id,omitempty" csv:"id"`
	StrategyName    string                    `json:"strategy_name" csv:"strategy_name"`
	RunName         string                    `json:"run_name" csv:"run_name"`
	Symbols         int                       `json:"symbols" csv:"symbols"`
	PeriodFrom      string                    `json:"period_from" csv:"period_from"`
	PeriodTo        string                    `json:"period_to" csv:"period_to"`
	Market          string                    `json:"market" csv:"market"`
	Timeframe       string                    `json:"timeframe" csv:"timeframe"`
	Timeframes      core.TimeframeMetadata    `json:"timeframes" csv:"-"`
	Runtime         core.RuntimeMetadata      `json:"runtime" csv:"-"`
	Currency        string                    `json:"currency" csv:"currency"`
	FinalEquity     float64                   `json:"final_equity" csv:"final_equity"`
	Metrics         core.Metrics              `json:"metrics,omitempty" csv:"-"`
	StrategyHash    string                    `json:"strategy_hash,omitempty" csv:"strategy_hash"`
	RunHash         string                    `json:"run_hash,omitempty" csv:"run_hash"`
	DataFingerprint string                    `json:"data_fingerprint" csv:"data_fingerprint"`
	ResultHash      string                    `json:"result_hash" csv:"result_hash"`
	Universe        backtestUniverseRow       `json:"universe" csv:"-"`
	Execution       core.ExecutionAssumption  `json:"execution" csv:"-"`
	Instruments     []core.InstrumentIdentity `json:"instruments,omitempty" csv:"-"`
}

type BacktestStrategyListOutput

type BacktestStrategyListOutput []BacktestStrategyOutput

func (BacktestStrategyListOutput) CSVRows

func (o BacktestStrategyListOutput) CSVRows() any

func (BacktestStrategyListOutput) JSONValue

func (o BacktestStrategyListOutput) JSONValue() any

func (BacktestStrategyListOutput) NDJSONRows

func (o BacktestStrategyListOutput) NDJSONRows() any

func (BacktestStrategyListOutput) TableRows

func (o BacktestStrategyListOutput) TableRows() ([]string, [][]string)

type BacktestStrategyOutput

type BacktestStrategyOutput struct {
	Detail      backtestservice.SavedStrategyDetail
	IncludeSpec bool
}

func (BacktestStrategyOutput) CSVRows

func (o BacktestStrategyOutput) CSVRows() any

func (BacktestStrategyOutput) JSONValue

func (o BacktestStrategyOutput) JSONValue() any

func (BacktestStrategyOutput) NDJSONRows

func (o BacktestStrategyOutput) NDJSONRows() any

func (BacktestStrategyOutput) TableRows

func (o BacktestStrategyOutput) TableRows() ([]string, [][]string)

type BacktestStrategyView

type BacktestStrategyView struct {
	Name          string             `json:"name" csv:"name"`
	Version       int                `json:"version" csv:"version"`
	SchemaVersion int                `json:"schema_version" csv:"schema_version"`
	Indicators    map[string]string  `json:"indicators,omitempty" csv:"-"`
	CreatedAt     string             `json:"created_at" csv:"created_at"`
	UpdatedAt     string             `json:"updated_at" csv:"updated_at"`
	SpecHash      string             `json:"spec_hash" csv:"spec_hash"`
	Spec          *core.StrategySpec `json:"spec,omitempty" csv:"-"`
}

type BacktestTradeRow

type BacktestTradeRow struct {
	Time        string  `json:"time" csv:"time"`
	Symbol      string  `json:"symbol" csv:"symbol"`
	Side        string  `json:"side" csv:"side"`
	Quantity    float64 `json:"quantity" csv:"quantity"`
	Price       float64 `json:"price" csv:"price"`
	Notional    float64 `json:"notional" csv:"notional"`
	Commission  float64 `json:"commission" csv:"commission"`
	Tax         float64 `json:"tax" csv:"tax"`
	ExchangeFee float64 `json:"exchange_fee" csv:"exchange_fee"`
	TotalCost   float64 `json:"total_cost" csv:"total_cost"`
	SlippageBps float64 `json:"slippage_bps" csv:"slippage_bps"`
	Reason      string  `json:"reason" csv:"reason"`
	RealizedPnL float64 `json:"realized_pnl" csv:"realized_pnl"`
	Return      float64 `json:"return" csv:"return"`
}

type BacktestUniverseOutput

type BacktestUniverseOutput struct {
	Explain core.UniverseExplain
	View    string
}

func (BacktestUniverseOutput) CSVRows

func (o BacktestUniverseOutput) CSVRows() any

func (BacktestUniverseOutput) JSONValue

func (o BacktestUniverseOutput) JSONValue() any

func (BacktestUniverseOutput) NDJSONRows

func (o BacktestUniverseOutput) NDJSONRows() any

func (BacktestUniverseOutput) TableRows

func (o BacktestUniverseOutput) TableRows() ([]string, [][]string)

type BacktestUniverseSnapshotSummary

type BacktestUniverseSnapshotSummary struct {
	Time           time.Time `json:"time"`
	Symbols        []string  `json:"symbols"`
	SymbolCount    int       `json:"symbol_count"`
	CandidateCount int       `json:"candidate_count"`
	DecisionCount  int       `json:"decision_count"`
	StepCount      int       `json:"step_count"`
}

type BacktestUniverseSummary

type BacktestUniverseSummary struct {
	Mode            string                            `json:"mode"`
	Schedule        string                            `json:"schedule"`
	PositionPolicy  string                            `json:"position_policy"`
	SelectedSymbols []string                          `json:"selected_symbols"`
	SymbolCount     int                               `json:"symbol_count"`
	StepCount       int                               `json:"step_count"`
	DecisionCount   int                               `json:"decision_count"`
	SnapshotCount   int                               `json:"snapshot_count"`
	Steps           []core.UniverseStepSummary        `json:"steps,omitempty"`
	Snapshots       []BacktestUniverseSnapshotSummary `json:"snapshots,omitempty"`
	RawView         string                            `json:"raw_view"`
}

type BacktestValidationOutput

type BacktestValidationOutput struct {
	Result backtestservice.ValidationResult
	View   string
}

func (BacktestValidationOutput) CSVRows

func (o BacktestValidationOutput) CSVRows() any

func (BacktestValidationOutput) JSONValue

func (o BacktestValidationOutput) JSONValue() any

func (BacktestValidationOutput) NDJSONRows

func (o BacktestValidationOutput) NDJSONRows() any

func (BacktestValidationOutput) TableRows

func (o BacktestValidationOutput) TableRows() ([]string, [][]string)

type BacktestValidationView

type BacktestValidationView struct {
	Valid        bool                             `json:"valid"`
	StrategyName string                           `json:"strategy_name"`
	RunName      string                           `json:"run_name"`
	Symbols      []string                         `json:"symbols"`
	Instruments  []core.InstrumentIdentity        `json:"instruments,omitempty"`
	Period       core.Period                      `json:"period"`
	Market       string                           `json:"market"`
	Timeframe    string                           `json:"timeframe"`
	Timeframes   core.TimeframeMetadata           `json:"timeframes"`
	Runtime      core.RuntimeMetadata             `json:"runtime"`
	Currency     string                           `json:"currency"`
	Execution    backtestservice.ExecutionSummary `json:"execution"`
	Metrics      []string                         `json:"metrics"`
	Indicators   map[string]string                `json:"indicators,omitempty"`
	Universe     BacktestUniverseSummary          `json:"universe"`
}

type CollectResultOutput

type CollectResultOutput struct {
	Result daily.CollectResult
}

func (CollectResultOutput) CSVRows

func (o CollectResultOutput) CSVRows() any

func (CollectResultOutput) JSONValue

func (o CollectResultOutput) JSONValue() any

func (CollectResultOutput) NDJSONRows

func (o CollectResultOutput) NDJSONRows() any

func (CollectResultOutput) TableRows

func (o CollectResultOutput) TableRows() ([]string, [][]string)

type CompareBacktestRunsRequest

type CompareBacktestRunsRequest struct {
	LeftRef  string
	RightRef string
}

type CompareEvaluationRequest

type CompareEvaluationRequest struct {
	Ref  string
	View string
}

type CompareScreenStrategiesRequest

type CompareScreenStrategiesRequest struct {
	Names []string
	AsOf  string
	TopN  int
}

type Composition

type Composition struct {
	// contains filtered or unexported fields
}

func NewComposition

func NewComposition(service composition.Service) Composition

func (Composition) List

type ConstituentsOutput

type ConstituentsOutput struct {
	Result compositionrole.ListResult
}

func (ConstituentsOutput) CSVRows

func (o ConstituentsOutput) CSVRows() any

func (ConstituentsOutput) JSONValue

func (o ConstituentsOutput) JSONValue() any

func (ConstituentsOutput) NDJSONRows

func (o ConstituentsOutput) NDJSONRows() any

func (ConstituentsOutput) TableRows

func (o ConstituentsOutput) TableRows() ([]string, [][]string)

type CreateStrategyRequest

type CreateStrategyRequest struct {
	Name         string
	Engine       strategyservice.Engine
	InputDataset string
	QueryText    string
}

type Daily

type Daily struct {
	// contains filtered or unexported fields
}

func NewDaily

func NewDaily(reader daily.ReadService, collector daily.Service) Daily

func (Daily) Backfill

func (Daily) Coverage

func (Daily) Ensure

func (Daily) Get

func (Daily) Sync

type DailyBarsOutput

type DailyBarsOutput []dailybar.Bar

func (DailyBarsOutput) CSVRows

func (o DailyBarsOutput) CSVRows() any

func (DailyBarsOutput) JSONValue

func (o DailyBarsOutput) JSONValue() any

func (DailyBarsOutput) NDJSONRows

func (o DailyBarsOutput) NDJSONRows() any

func (DailyBarsOutput) TableRows

func (o DailyBarsOutput) TableRows() ([]string, [][]string)

type DailyCoverageOutput

type DailyCoverageOutput struct {
	Result daily.CoverageResult
}

func (DailyCoverageOutput) CSVRows

func (o DailyCoverageOutput) CSVRows() any

func (DailyCoverageOutput) JSONValue

func (o DailyCoverageOutput) JSONValue() any

func (DailyCoverageOutput) NDJSONRows

func (o DailyCoverageOutput) NDJSONRows() any

func (DailyCoverageOutput) TableRows

func (o DailyCoverageOutput) TableRows() ([]string, [][]string)

type DailyCoverageRequest

type DailyCoverageRequest struct {
	Market       provider.Market
	SecurityType provider.SecurityType
	Symbol       string
}

type DailyStorageSummaryOutput

type DailyStorageSummaryOutput struct {
	Result daily.StorageSummaryResult
}

func (DailyStorageSummaryOutput) CSVRows

func (o DailyStorageSummaryOutput) CSVRows() any

func (DailyStorageSummaryOutput) JSONValue

func (o DailyStorageSummaryOutput) JSONValue() any

func (DailyStorageSummaryOutput) NDJSONRows

func (o DailyStorageSummaryOutput) NDJSONRows() any

func (DailyStorageSummaryOutput) TableRows

func (o DailyStorageSummaryOutput) TableRows() ([]string, [][]string)

type DailyStorageSummaryRequest

type DailyStorageSummaryRequest struct {
	Market       provider.Market
	SecurityType provider.SecurityType
}

type DeleteBacktestStrategyRequest

type DeleteBacktestStrategyRequest struct {
	Name string
}

type DeleteBacktestStrategyResult

type DeleteBacktestStrategyResult struct {
	Name    string `json:"name" csv:"name"`
	Deleted bool   `json:"deleted" csv:"deleted"`
}

func (DeleteBacktestStrategyResult) CSVRows

func (r DeleteBacktestStrategyResult) CSVRows() any

func (DeleteBacktestStrategyResult) JSONValue

func (r DeleteBacktestStrategyResult) JSONValue() any

func (DeleteBacktestStrategyResult) NDJSONRows

func (r DeleteBacktestStrategyResult) NDJSONRows() any

func (DeleteBacktestStrategyResult) TableRows

func (r DeleteBacktestStrategyResult) TableRows() ([]string, [][]string)

type DeleteStrategyRequest

type DeleteStrategyRequest struct {
	Name string
}

type DeleteStrategyResult

type DeleteStrategyResult struct {
	Name    string `json:"name" csv:"name"`
	Deleted bool   `json:"deleted" csv:"deleted"`
}

func (DeleteStrategyResult) CSVRows

func (r DeleteStrategyResult) CSVRows() any

func (DeleteStrategyResult) TableRows

func (r DeleteStrategyResult) TableRows() ([]string, [][]string)

type EnsureDailyRequest

type EnsureDailyRequest struct {
	ProviderID     provider.ProviderID
	PreferProvider provider.ProviderID
	Market         provider.Market
	SecurityType   provider.SecurityType
	Symbol         string
	From           string
	To             string
	AsOf           string
}

type EvaluationDetailOutput

type EvaluationDetailOutput struct {
	Detail backtestservice.SavedEvaluationDetail
	View   string
}

func (EvaluationDetailOutput) CSVRows

func (o EvaluationDetailOutput) CSVRows() any

func (EvaluationDetailOutput) JSONValue

func (o EvaluationDetailOutput) JSONValue() any

func (EvaluationDetailOutput) NDJSONRows

func (o EvaluationDetailOutput) NDJSONRows() any

func (EvaluationDetailOutput) TableRows

func (o EvaluationDetailOutput) TableRows() ([]string, [][]string)

type EvaluationListOutput

type EvaluationListOutput []backtestservice.SavedEvaluationSummary

func (EvaluationListOutput) CSVRows

func (o EvaluationListOutput) CSVRows() any

func (EvaluationListOutput) JSONValue

func (o EvaluationListOutput) JSONValue() any

func (EvaluationListOutput) NDJSONRows

func (o EvaluationListOutput) NDJSONRows() any

func (EvaluationListOutput) TableRows

func (o EvaluationListOutput) TableRows() ([]string, [][]string)

type EvaluationRankOutput

type EvaluationRankOutput []backtestservice.SavedExperimentCase

func (EvaluationRankOutput) CSVRows

func (o EvaluationRankOutput) CSVRows() any

func (EvaluationRankOutput) JSONValue

func (o EvaluationRankOutput) JSONValue() any

func (EvaluationRankOutput) NDJSONRows

func (o EvaluationRankOutput) NDJSONRows() any

func (EvaluationRankOutput) TableRows

func (o EvaluationRankOutput) TableRows() ([]string, [][]string)

type EvaluationRegimeSplitView

type EvaluationRegimeSplitView struct {
	Tag              string       `json:"tag" csv:"tag"`
	CaseCount        int          `json:"case_count" csv:"case_count"`
	PassedCount      int          `json:"passed_count" csv:"passed_count"`
	Objective        string       `json:"objective,omitempty" csv:"objective"`
	BestCaseID       string       `json:"best_case_id,omitempty" csv:"best_case_id"`
	BestObjective    float64      `json:"best_objective" csv:"best_objective"`
	AverageObjective float64      `json:"average_objective" csv:"average_objective"`
	AverageMetrics   core.Metrics `json:"average_metrics,omitempty" csv:"-"`
}

type EvaluationRobustnessRow

type EvaluationRobustnessRow struct {
	Parameter                 string  `json:"parameter" csv:"parameter"`
	CaseCount                 int     `json:"case_count" csv:"case_count"`
	ValueCount                int     `json:"value_count" csv:"value_count"`
	BestValue                 string  `json:"best_value,omitempty" csv:"best_value"`
	BestCaseID                string  `json:"best_case_id,omitempty" csv:"best_case_id"`
	BestObjective             float64 `json:"best_objective" csv:"best_objective"`
	WorstValue                string  `json:"worst_value,omitempty" csv:"worst_value"`
	ObjectiveRange            float64 `json:"objective_range" csv:"objective_range"`
	TopNOverlap               float64 `json:"top_n_overlap" csv:"top_n_overlap"`
	OutOfSampleDegradationPct float64 `json:"out_of_sample_degradation_pct" csv:"out_of_sample_degradation_pct"`
}

type EvaluationRunOutput

type EvaluationRunOutput struct {
	Result backtestservice.EvaluationRunResult
}

func (EvaluationRunOutput) CSVRows

func (o EvaluationRunOutput) CSVRows() any

func (EvaluationRunOutput) JSONValue

func (o EvaluationRunOutput) JSONValue() any

func (EvaluationRunOutput) NDJSONRows

func (o EvaluationRunOutput) NDJSONRows() any

func (EvaluationRunOutput) TableRows

func (o EvaluationRunOutput) TableRows() ([]string, [][]string)

type EvaluationSummaryView

type EvaluationSummaryView struct {
	ID                   string    `json:"id" csv:"id"`
	Name                 string    `json:"name" csv:"name"`
	StrategyName         string    `json:"strategy_name" csv:"strategy_name"`
	BaseRunName          string    `json:"base_run_name" csv:"base_run_name"`
	SchemaVersion        int       `json:"schema_version" csv:"schema_version"`
	SpecHash             string    `json:"spec_hash" csv:"spec_hash"`
	StrategySpecHash     string    `json:"strategy_spec_hash" csv:"strategy_spec_hash"`
	DataFrom             string    `json:"data_from" csv:"data_from"`
	DataTo               string    `json:"data_to" csv:"data_to"`
	CaseCount            int       `json:"case_count" csv:"case_count"`
	WalkForwardStepCount int       `json:"walk_forward_step_count" csv:"walk_forward_step_count"`
	BestCaseID           string    `json:"best_case_id,omitempty" csv:"best_case_id"`
	CreatedAt            time.Time `json:"created_at" csv:"created_at"`
}

type EvaluationValidationOutput

type EvaluationValidationOutput struct {
	Result backtestservice.EvaluationValidationResult
}

func (EvaluationValidationOutput) CSVRows

func (o EvaluationValidationOutput) CSVRows() any

func (EvaluationValidationOutput) JSONValue

func (o EvaluationValidationOutput) JSONValue() any

func (EvaluationValidationOutput) NDJSONRows

func (o EvaluationValidationOutput) NDJSONRows() any

func (EvaluationValidationOutput) TableRows

func (o EvaluationValidationOutput) TableRows() ([]string, [][]string)

type FinancialStatementsOutput

type FinancialStatementsOutput []financials.Statement

func (FinancialStatementsOutput) CSVRows

func (o FinancialStatementsOutput) CSVRows() any

func (FinancialStatementsOutput) JSONValue

func (o FinancialStatementsOutput) JSONValue() any

func (FinancialStatementsOutput) NDJSONRows

func (o FinancialStatementsOutput) NDJSONRows() any

func (FinancialStatementsOutput) TableRows

func (o FinancialStatementsOutput) TableRows() ([]string, [][]string)

type Financials

type Financials struct {
	// contains filtered or unexported fields
}

func NewFinancials

func NewFinancials(service financialsservice.Service) Financials

func (Financials) Get

type GetDailyRequest

type GetDailyRequest struct {
	Market       provider.Market
	SecurityType provider.SecurityType
	Symbol       string
	From         string
	To           string
	AsOf         string
}

type GetFinancialsRequest

type GetFinancialsRequest struct {
	ProviderID     provider.ProviderID
	PreferProvider provider.ProviderID
	Market         provider.Market
	SecurityType   provider.SecurityType
	Symbol         string
	FiscalYear     string
	Period         financialsrole.PeriodType
	Statement      financialsrole.StatementType
	Limit          int
}

type GetIndexRequest

type GetIndexRequest struct {
	ProviderID     provider.ProviderID
	PreferProvider provider.ProviderID
	Market         provider.Market
	IndexCode      string
	From           string
	To             string
	AsOf           string
}

type GetIntradayRequest

type GetIntradayRequest struct {
	ProviderID     provider.ProviderID
	PreferProvider provider.ProviderID
	Market         provider.Market
	SecurityType   provider.SecurityType
	Symbol         string
	At             string
	Limit          int
}

type GetOrderbookRequest

type GetOrderbookRequest struct {
	ProviderID     provider.ProviderID
	PreferProvider provider.ProviderID
	Market         provider.Market
	SecurityType   provider.SecurityType
	Symbol         string
}

type GetQuoteRequest

type GetQuoteRequest struct {
	ProviderID     provider.ProviderID
	PreferProvider provider.ProviderID
	Market         provider.Market
	SecurityType   provider.SecurityType
	Symbol         string
}

type Index

type Index struct {
	// contains filtered or unexported fields
}

func NewIndex

func NewIndex(reader indexservice.ReadService, collector indexservice.Service) Index

func (Index) Get

func (Index) GetStored

func (h Index) GetStored(ctx context.Context, req GetIndexRequest) (IndexBarsOutput, error)

func (Index) Sync

type IndexBarsOutput

type IndexBarsOutput []indexbar.Bar

func (IndexBarsOutput) CSVRows

func (o IndexBarsOutput) CSVRows() any

func (IndexBarsOutput) JSONValue

func (o IndexBarsOutput) JSONValue() any

func (IndexBarsOutput) NDJSONRows

func (o IndexBarsOutput) NDJSONRows() any

func (IndexBarsOutput) TableRows

func (o IndexBarsOutput) TableRows() ([]string, [][]string)

type IndexCollectResultOutput

type IndexCollectResultOutput struct {
	Result indexservice.CollectResult
}

func (IndexCollectResultOutput) CSVRows

func (o IndexCollectResultOutput) CSVRows() any

func (IndexCollectResultOutput) JSONValue

func (o IndexCollectResultOutput) JSONValue() any

func (IndexCollectResultOutput) NDJSONRows

func (o IndexCollectResultOutput) NDJSONRows() any

func (IndexCollectResultOutput) TableRows

func (o IndexCollectResultOutput) TableRows() ([]string, [][]string)

type InspectBacktestRunRequest

type InspectBacktestRunRequest struct {
	Ref  string
	View string
}

type InspectBacktestStrategyRequest

type InspectBacktestStrategyRequest struct {
	Name string
}

type InspectBacktestUniverseRequest

type InspectBacktestUniverseRequest struct {
	Path string
	View string
}

type InspectEvaluationRequest

type InspectEvaluationRequest struct {
	Ref  string
	View string
}

type InspectInstrumentRequest

type InspectInstrumentRequest struct {
	ProviderID     provider.ProviderID
	PreferProvider provider.ProviderID
	Market         provider.Market
	SecurityType   provider.SecurityType
	Symbol         string
}

type InspectMarketRegimeRequest

type InspectMarketRegimeRequest struct {
	Path string
	AsOf string
}

type InspectScreenPipelineRequest

type InspectScreenPipelineRequest struct {
	Path string
}

type InspectScreenRequest

type InspectScreenRequest struct {
	Ref string
}

type InspectStrategyRequest

type InspectStrategyRequest struct {
	Name string
}

type InspectStrategySetRequest

type InspectStrategySetRequest struct {
	Path string
	AsOf string
}

type Instrument

type Instrument struct {
	// contains filtered or unexported fields
}

func NewInstrument

func NewInstrument(service instrument.Service) Instrument

func (Instrument) Inspect

func (Instrument) List

func (Instrument) Sync

type InstrumentOutput

type InstrumentOutput struct {
	Result instrument.InspectResult
}

func (InstrumentOutput) CSVRows

func (o InstrumentOutput) CSVRows() any

func (InstrumentOutput) JSONValue

func (o InstrumentOutput) JSONValue() any

func (InstrumentOutput) NDJSONRows

func (o InstrumentOutput) NDJSONRows() any

func (InstrumentOutput) TableRows

func (o InstrumentOutput) TableRows() ([]string, [][]string)

type InstrumentSyncOutput

type InstrumentSyncOutput struct {
	Result instrument.SyncResult
}

func (InstrumentSyncOutput) CSVRows

func (o InstrumentSyncOutput) CSVRows() any

func (InstrumentSyncOutput) JSONValue

func (o InstrumentSyncOutput) JSONValue() any

func (InstrumentSyncOutput) NDJSONRows

func (o InstrumentSyncOutput) NDJSONRows() any

func (InstrumentSyncOutput) TableRows

func (o InstrumentSyncOutput) TableRows() ([]string, [][]string)

type InstrumentsOutput

type InstrumentsOutput struct {
	Result instrumentrole.SearchResult
}

func (InstrumentsOutput) CSVRows

func (o InstrumentsOutput) CSVRows() any

func (InstrumentsOutput) JSONValue

func (o InstrumentsOutput) JSONValue() any

func (InstrumentsOutput) NDJSONRows

func (o InstrumentsOutput) NDJSONRows() any

func (InstrumentsOutput) TableRows

func (o InstrumentsOutput) TableRows() ([]string, [][]string)

type Intraday

type Intraday struct {
	// contains filtered or unexported fields
}

func NewIntraday

func NewIntraday(service intraday.Service) Intraday

func (Intraday) Get

type IntradayBarsOutput

type IntradayBarsOutput []intradaybar.Bar

func (IntradayBarsOutput) CSVRows

func (o IntradayBarsOutput) CSVRows() any

func (IntradayBarsOutput) JSONValue

func (o IntradayBarsOutput) JSONValue() any

func (IntradayBarsOutput) NDJSONRows

func (o IntradayBarsOutput) NDJSONRows() any

func (IntradayBarsOutput) TableRows

func (o IntradayBarsOutput) TableRows() ([]string, [][]string)

type ListBacktestRunsRequest

type ListBacktestRunsRequest struct{}

type ListBacktestStrategiesRequest

type ListBacktestStrategiesRequest struct{}

type ListConstituentsRequest

type ListConstituentsRequest struct {
	ProviderID     provider.ProviderID
	PreferProvider provider.ProviderID
	Market         provider.Market
	SecurityType   provider.SecurityType
	Symbol         string
	Limit          int
}

type ListEvaluationsRequest

type ListEvaluationsRequest struct{}

type ListInstrumentsRequest

type ListInstrumentsRequest struct {
	ProviderID     provider.ProviderID
	PreferProvider provider.ProviderID
	Market         provider.Market
	SecurityType   provider.SecurityType
	Query          string
	Limit          int
}

type ListStrategiesRequest

type ListStrategiesRequest struct{}

type ListTradesRequest

type ListTradesRequest struct {
	ProviderID     provider.ProviderID
	PreferProvider provider.ProviderID
	Market         provider.Market
	SecurityType   provider.SecurityType
	Symbol         string
	At             string
	Limit          int
}

type MarketRegimeOutput

type MarketRegimeOutput struct {
	Result universecore.MarketRegimeResult
}

func (MarketRegimeOutput) CSVRows

func (o MarketRegimeOutput) CSVRows() any

func (MarketRegimeOutput) JSONValue

func (o MarketRegimeOutput) JSONValue() any

func (MarketRegimeOutput) NDJSONRows

func (o MarketRegimeOutput) NDJSONRows() any

func (MarketRegimeOutput) TableRows

func (o MarketRegimeOutput) TableRows() ([]string, [][]string)

type Migration

type Migration struct {
	// contains filtered or unexported fields
}

func NewMigration

func NewMigration(runner migrationcore.Runner) Migration

func (Migration) Apply

func (Migration) Status

type MigrationApplyOutput

type MigrationApplyOutput struct {
	Result migrationcore.ApplyResult
}

func (MigrationApplyOutput) JSONValue

func (o MigrationApplyOutput) JSONValue() any

func (MigrationApplyOutput) TableRows

func (o MigrationApplyOutput) TableRows() ([]string, [][]string)

type MigrationStatusOutput

type MigrationStatusOutput struct {
	Result migrationcore.StatusResult
}

func (MigrationStatusOutput) JSONValue

func (o MigrationStatusOutput) JSONValue() any

func (MigrationStatusOutput) TableRows

func (o MigrationStatusOutput) TableRows() ([]string, [][]string)

type Orderbook

type Orderbook struct {
	// contains filtered or unexported fields
}

func NewOrderbook

func NewOrderbook(service orderbookservice.Service) Orderbook

func (Orderbook) Get

type OrderbookOutput

type OrderbookOutput struct {
	Result orderbook.SnapshotResult
}

func (OrderbookOutput) CSVRows

func (o OrderbookOutput) CSVRows() any

func (OrderbookOutput) JSONValue

func (o OrderbookOutput) JSONValue() any

func (OrderbookOutput) NDJSONRows

func (o OrderbookOutput) NDJSONRows() any

func (OrderbookOutput) TableRows

func (o OrderbookOutput) TableRows() ([]string, [][]string)

type Quote

type Quote struct {
	// contains filtered or unexported fields
}

func NewQuote

func NewQuote(service quote.Service) Quote

func (Quote) Get

type QuoteOutput

type QuoteOutput struct {
	Result quoterole.SnapshotResult
}

func (QuoteOutput) CSVRows

func (o QuoteOutput) CSVRows() any

func (QuoteOutput) JSONValue

func (o QuoteOutput) JSONValue() any

func (QuoteOutput) NDJSONRows

func (o QuoteOutput) NDJSONRows() any

func (QuoteOutput) TableRows

func (o QuoteOutput) TableRows() ([]string, [][]string)

type RankEvaluationRequest

type RankEvaluationRequest struct {
	Ref       string
	Objective string
}

type RunBacktestRequest

type RunBacktestRequest struct {
	Path string
	View string
}

type RunEvaluationRequest

type RunEvaluationRequest struct {
	Path        string
	Parallelism int
}

type ScreenHistoryRequest

type ScreenHistoryRequest struct {
	Limit int
}

type ScreenJQRequest

type ScreenJQRequest struct {
	InputDataset string
	QueryText    string
}

type ScreenPipelineOutput

type ScreenPipelineOutput struct {
	Result universeservice.ScreenPipelineResult
}

func (ScreenPipelineOutput) CSVRows

func (o ScreenPipelineOutput) CSVRows() any

func (ScreenPipelineOutput) JSONValue

func (o ScreenPipelineOutput) JSONValue() any

func (ScreenPipelineOutput) NDJSONRows

func (o ScreenPipelineOutput) NDJSONRows() any

func (ScreenPipelineOutput) TableRows

func (o ScreenPipelineOutput) TableRows() ([]string, [][]string)

type ScreenPipelineRequest

type ScreenPipelineRequest struct {
	Path string
}

type ScreenResultOutput

type ScreenResultOutput struct {
	Result strategyservice.ScreenResult
}

func (ScreenResultOutput) CSVRows

func (o ScreenResultOutput) CSVRows() any

func (ScreenResultOutput) JSONValue

func (o ScreenResultOutput) JSONValue() any

func (ScreenResultOutput) NDJSONRows

func (o ScreenResultOutput) NDJSONRows() any

func (ScreenResultOutput) TableRows

func (o ScreenResultOutput) TableRows() ([]string, [][]string)

type ScreenRunDetailOutput

type ScreenRunDetailOutput struct {
	Detail strategyservice.ScreenRunDetail
}

func (ScreenRunDetailOutput) CSVRows

func (o ScreenRunDetailOutput) CSVRows() any

func (ScreenRunDetailOutput) JSONValue

func (o ScreenRunDetailOutput) JSONValue() any

func (ScreenRunDetailOutput) NDJSONRows

func (o ScreenRunDetailOutput) NDJSONRows() any

func (ScreenRunDetailOutput) TableRows

func (o ScreenRunDetailOutput) TableRows() ([]string, [][]string)

type ScreenRunHistoryOutput

type ScreenRunHistoryOutput []strategyservice.ScreenRun

func (ScreenRunHistoryOutput) CSVRows

func (o ScreenRunHistoryOutput) CSVRows() any

func (ScreenRunHistoryOutput) JSONValue

func (o ScreenRunHistoryOutput) JSONValue() any

func (ScreenRunHistoryOutput) NDJSONRows

func (o ScreenRunHistoryOutput) NDJSONRows() any

func (ScreenRunHistoryOutput) TableRows

func (o ScreenRunHistoryOutput) TableRows() ([]string, [][]string)

type ScreenStrategyComparisonOutput

type ScreenStrategyComparisonOutput struct {
	Result strategyservice.ScreenStrategyComparison
}

func (ScreenStrategyComparisonOutput) CSVRows

func (o ScreenStrategyComparisonOutput) CSVRows() any

func (ScreenStrategyComparisonOutput) JSONValue

func (o ScreenStrategyComparisonOutput) JSONValue() any

func (ScreenStrategyComparisonOutput) NDJSONRows

func (o ScreenStrategyComparisonOutput) NDJSONRows() any

func (ScreenStrategyComparisonOutput) TableRows

func (o ScreenStrategyComparisonOutput) TableRows() ([]string, [][]string)

type ScreenStrategyRequest

type ScreenStrategyRequest struct {
	Name     string
	Alias    string
	Version  string
	SpecHash string
}

type Strategy

type Strategy struct {
	// contains filtered or unexported fields
}

func NewStrategy

func NewStrategy(service strategyservice.Service, universe ...universeservice.Runner) Strategy

func (Strategy) Create

func (Strategy) Delete

func (Strategy) History

func (Strategy) Inspect

func (Strategy) InspectMarketRegime

func (h Strategy) InspectMarketRegime(ctx context.Context, req InspectMarketRegimeRequest) (MarketRegimeOutput, error)

func (Strategy) InspectScreen

func (Strategy) InspectScreenPipeline

func (h Strategy) InspectScreenPipeline(ctx context.Context, req InspectScreenPipelineRequest) (ScreenPipelineOutput, error)

func (Strategy) InspectStrategySet

func (h Strategy) InspectStrategySet(ctx context.Context, req InspectStrategySetRequest) (StrategySetOutput, error)

func (Strategy) List

func (Strategy) Screen

func (Strategy) ScreenJQ

func (Strategy) ScreenPipeline

func (Strategy) Update

func (Strategy) UpsertScreenStrategy

func (h Strategy) UpsertScreenStrategy(ctx context.Context, req UpsertScreenStrategyRequest) (StrategyDetailOutput, error)

type StrategyDetailOutput

type StrategyDetailOutput struct {
	Detail strategyservice.StrategyDetail
}

func (StrategyDetailOutput) CSVRows

func (o StrategyDetailOutput) CSVRows() any

func (StrategyDetailOutput) JSONValue

func (o StrategyDetailOutput) JSONValue() any

func (StrategyDetailOutput) NDJSONRows

func (o StrategyDetailOutput) NDJSONRows() any

func (StrategyDetailOutput) TableRows

func (o StrategyDetailOutput) TableRows() ([]string, [][]string)

type StrategyListOutput

type StrategyListOutput []strategyservice.StrategyDetail

func (StrategyListOutput) CSVRows

func (o StrategyListOutput) CSVRows() any

func (StrategyListOutput) JSONValue

func (o StrategyListOutput) JSONValue() any

func (StrategyListOutput) NDJSONRows

func (o StrategyListOutput) NDJSONRows() any

func (StrategyListOutput) TableRows

func (o StrategyListOutput) TableRows() ([]string, [][]string)

type StrategySetOutput

type StrategySetOutput struct {
	Result universeservice.StrategySetSelectionResult
}

func (StrategySetOutput) CSVRows

func (o StrategySetOutput) CSVRows() any

func (StrategySetOutput) JSONValue

func (o StrategySetOutput) JSONValue() any

func (StrategySetOutput) NDJSONRows

func (o StrategySetOutput) NDJSONRows() any

func (StrategySetOutput) TableRows

func (o StrategySetOutput) TableRows() ([]string, [][]string)

type SyncDailyRequest

type SyncDailyRequest struct {
	ProviderID     provider.ProviderID
	PreferProvider provider.ProviderID
	Market         provider.Market
	SecurityType   provider.SecurityType
	AsOf           string
}

type SyncIndexRequest

type SyncIndexRequest struct {
	ProviderID     provider.ProviderID
	PreferProvider provider.ProviderID
	Market         provider.Market
	IndexCode      string
	AsOf           string
}

type SyncInstrumentsRequest

type SyncInstrumentsRequest struct {
	ProviderID     provider.ProviderID
	PreferProvider provider.ProviderID
	Market         provider.Market
	SecurityType   provider.SecurityType
	AsOf           string
}

type Trades

type Trades struct {
	// contains filtered or unexported fields
}

func NewTrades

func NewTrades(service tradesservice.Service) Trades

func (Trades) List

type TradesOutput

type TradesOutput []tradesrole.Trade

func (TradesOutput) CSVRows

func (o TradesOutput) CSVRows() any

func (TradesOutput) JSONValue

func (o TradesOutput) JSONValue() any

func (TradesOutput) NDJSONRows

func (o TradesOutput) NDJSONRows() any

func (TradesOutput) TableRows

func (o TradesOutput) TableRows() ([]string, [][]string)

type UpdateBacktestStrategyRequest

type UpdateBacktestStrategyRequest struct {
	Name     string
	YAMLPath string
}

type UpdateStrategyRequest

type UpdateStrategyRequest struct {
	Name      string
	QueryText string
}

type UpsertScreenStrategyRequest

type UpsertScreenStrategyRequest struct {
	Name string
	Path string
}

type ValidateBacktestRequest

type ValidateBacktestRequest struct {
	Path string
	View string
}

type ValidateEvaluationRequest

type ValidateEvaluationRequest struct {
	Path string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL