Inspiration

Traditional dollar-cost averaging is disciplined, but it can also be rigid. Investors may keep buying the same amount near historical highs, stop investing during drawdowns, or later forget why they changed their plan.

We built IndexLink to make recurring investment decisions more adaptive and explainable without claiming that AI can predict the market. The project focuses on measuring historical market position, controlling risk, and preserving an auditable decision process.

What it does

IndexLink is a Qwen-powered adaptive dollar-cost averaging agent.

For each investment plan, it combines:

  • 70% historical position, based on valuation and historical percentiles;
  • 20% recent trend, based on indicators such as MA200, RSI, and VIX;
  • 10% Qwen sentiment, based on recent financial news.

The system generates a bounded action such as Overweight, Standard, Underweight, Tactical Delay, or Skip.

Each decision is saved with its market inputs, Qwen explanation, warnings, final score, action, and optional paper-order result. The scheduler can automatically generate decision records, but it never submits an order automatically. Paper orders require explicit human confirmation.

How we built it

IndexLink uses a modular architecture:

  • Rust, Axum, and Tokio for the backend;
  • React, TypeScript, and Vite for the dashboard;
  • SQLite and SQLx for plans, decision records, scheduler claims, and the paper-trading ledger;
  • Qwen through Alibaba Cloud Model Studio / DashScope for financial-news analysis;
  • Docker Compose and Alibaba Cloud ECS for cloud deployment;
  • MockBroker and local Futu/Moomoo OpenD for paper trading.

The quantitative and decision engines are separated from external services. This keeps the core calculations deterministic, testable, and reusable.

Challenges we ran into

One major challenge was preventing Qwen from becoming an unrestricted market-prediction system. We solved this by limiting the AI layer to 10% of the decision score and bounding all outputs.

External data sources can also fail independently. When Qwen is unavailable, IndexLink falls back to a deterministic 90/10/0 mode. When essential market data is unavailable, the scheduler does not create a synthetic decision.

We also had to handle financial precision, scheduler duplication, and broker safety. Monetary values use decimal string contracts, scheduled runs are protected by persistent idempotency claims, and OpenD is restricted to local loopback paper accounts.

Accomplishments that we're proud of

We built an end-to-end MVP rather than a simple financial chatbot.

IndexLink can:

  • create and manage recurring investment plans;
  • collect quantitative market signals;
  • call Qwen for bounded news analysis;
  • generate and store explainable decisions;
  • run scheduled decision audits;
  • display decision history and portfolio information;
  • submit human-approved paper orders;
  • run as a Dockerized backend on Alibaba Cloud ECS.

We are especially proud that the system stores the evidence behind each decision instead of showing only a final recommendation.

What we learned

We learned that a useful AI agent does not need unlimited autonomy. In a financial workflow, deterministic rules, amount limits, safe degradation, audit records, and human approval are more important than giving the model complete control.

We also learned that explainability requires storing the inputs available at decision time. A final score alone cannot explain why a decision was made.

Finally, historical experiments showed that repeatedly delaying investments can create cash drag. This helped us understand that adaptive DCA must preserve long-term market exposure and use strict budget constraints.

What's next for IndexLink

The next stage will focus on:

  • configurable review intervals from 1 to 31 days;
  • delayed re-evaluation after a Tactical Delay;
  • monthly budget and reserve controls;
  • a core DCA bucket with a smaller adaptive bucket;
  • full historical replay of the 70/20/10 strategy;
  • stronger data-source health and provenance reporting;
  • longer forward testing against standard DCA;
  • authentication and multi-user cloud storage.

IndexLink will continue to focus on bounded, explainable, and human-controlled investment automation rather than automatic live trading or guaranteed returns.

Built With

Share this project:

Updates