Separate two different jobs.

A trend and its momentum can point in different directions. A market can still be rising while the pace of that rise slows. Collapsing both observations into a single bullish or bearish sentence loses useful information.

I designed the scoring layer around six factors: trend, momentum, volatility, liquidity, trust and sentiment. The market regime affects their weighting. The model gets the resulting evidence; it does not decide what each factor scored.

Retrieve context with a budget.

I built retrieval on PostgreSQL and pgvector, using embedding search, memory distillation and caching to assemble relevant context. The scoring result remains separate from the material retrieved to help explain it.

I implemented Azure OpenAI model routing, input-token limits and per-request cost caps. Those constraints make the choice of context a design decision: the explanation needs enough evidence to be useful without carrying every available document into the request.

Make the claim small enough to check.

In the example above, “the trend is rising, but more slowly” has two parts. A reader can inspect the trend behind the first and the momentum behind the second. Neither observation says what the market will do next.

I also implemented controls for cache behavior, memory retention and logs. The product reached public beta; the figures on this page illustrate the architecture, not investment performance.

Source material