x-trend-architecture

Implement attention-based time-series models with LSTM encoders and cross-attention.

Updated Nov 14, 2025
One-click install
npx skills add https://github.com/Donaldshen27/xtrend-vanilla --skill x-trend-architecture
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: x-trend-architecture
Source: https://github.com/Donaldshen27/xtrend-vanilla/tree/main/.claude/skills/x-trend-architecture
Command: npx skills add https://github.com/Donaldshen27/xtrend-vanilla --skill x-trend-architecture

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Provides a complete blueprint for implementing the X-Trend architecture, enabling practitioners to build cross-attentive time-series models for trend-following, forecasting, and interpretable trading signals.

Core Features & Use Cases

  • Input features: 8-dimensional vectors combining normalized returns and MACD indicators for robust temporal modeling.
  • VSN & embeddings: Feature selection networks and asset embeddings to handle multi-asset regimes and few-shot learning.
  • Attention & encoder-decoder: Self-attention over context, cross-attention between target and context, plus an encoder-decoder structure for prediction and position forecasting.
  • Use Case: Build an end-to-end trading model that predicts positions and forecasts distributions with interpretable attention patterns.

Quick Start

Initialize the X-Trend model and begin training using episodic learning as described in TRAINING.md.

Frequently Asked Questions about x-trend-architecture

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build an attention-based time-series model for multi-asset trading?

Build attention-based time-series models using an encoder-decoder structure with LSTM encoders and multi-head cross-attention to generate interpretable predictions and position forecasts across multiple financial assets.

What is cross-attention used for in financial time-series forecasting?

Cross-attention in financial time-series forecasting aligns target asset queries with context sequences, enabling the model to capture multi-asset regime shifts and generate interpretable trend-following trading signals.

How do I handle few-shot learning for new assets in time-series forecasting?

Handle few-shot learning for new assets by applying Variable Selection Networks and entity embeddings, which adapt the model to diverse multi-asset regimes with limited historical data during episodic training.

Can I use MACD indicators as input features for an LSTM encoder-decoder model?

Use MACD indicators combined with normalized returns to form 8-dimensional input vectors, providing robust temporal modeling for the LSTM encoder-decoder architecture to predict asset positions.

How do I train a cross-attentive time-series model for trend-following strategies?

Train cross-attentive time-series models using episodic learning guidelines, iteratively updating multi-head attention weights and variable selection networks to optimize trend-following signal generation.

Does this architecture support interpretable predictions across multiple assets?

This architecture supports interpretable predictions across multiple assets by leveraging self-attention over context and cross-attention between target and context, producing transparent attention patterns for trading signals.