Inspiration

On September 10, 2026 T. Rowe Price announced it is bringing Claude into its investment research, the part of the firm where, in its CTO's words, the bar for accuracy and judgment is highest. I had been running an AI investment firm on my laptop since June, and that sentence made me ask the question nobody asks about AI in finance. When an AI helps make an investment decision, how do you know it was right? So I graded my own. Across 1,794 real committee decisions, its buy and sell calls were right only 41% of the time over the next 20 trading days, measured against the S&P 500. Confident is not the same as right. The problem worth solving is memory and accountability, not a smarter chatbot.

What it does

Loch Raven Capital is an AI investment firm with an institutional memory.

  • The firm, an agentic flow. A quant screen over the whole US market, five Claude research desks, a bull, bear and base case debate, a portfolio manager judge, a risk desk with hard limits and an execution desk.
  • Four sleeves, 100,000 dollars of paper money, allocated by the AI team. Alpha Stocks, Core Blend, an Options Desk and ETF Rotation started with 25,000 dollars each on June 9. The portfolio manager sizes every position, the risk desk caps it, and a weekly rebalance moves idle cash when a sleeve drifts outside 12 to 40 percent of the firm. At the September 25 close the book stood at 100,309 dollars while the S&P 500 rose 4.6 percent. The rule based sleeves tracked the index and the stock picking sleeve lagged it, which is the gap the memory layer was built to close.
  • The playbook. Nine methodology chapters the AI can search, covering financial statements, thesis work, modeling, multiples, DCF, research writing and risk policy, plus 12 lessons the firm distilled from its own graded trades. I wrote them from my Wall Street Prep equity research certification notes and a DCF lesson series taught at Morgan State.
  • The history. Every committee decision, graded against the S&P 500 5 and 20 trading days later, with the date that grade became knowable.
  • Memory in the background of every decision. The cockpit looks exactly as it always did. Before the portfolio manager judge rules on any stock, the firm retrieves the most relevant playbook passages and graded past decisions, and the judge must cite what it relies on as K and P numbers. Outcomes it could not have known on that date stay hidden. Open any verdict and its memory line shows what it was shown.
  • Checks the model cannot override. Every verdict's citations must point at sources it was actually shown, every figure is checked against the evidence, and each verdict is logged to a hash chained audit trail. Position limits, a risk ladder and a diagnosing kill switch stay in charge, and the firm trades paper money until a human flips it live.
  • A memory inspector. The same app serves a console at /memory to ask the firm what its history says about any name and to see the honest scorecard.
  • Fine tuning data, done carefully. Supervised, KTO and reward datasets in the RAFT format, where each example carries the passages and precedents the committee could have retrieved that day, split by time with zero leaked rows and labeled by what the market did.
  • An honest scorecard. A walk forward test of whether memory should be allowed to veto trades. It should not. Calls the memory supported were right 32 percent of the time and calls it warned against 45 percent, and no retrieval setting reversed that.

How I built it

Python and FastAPI behind the original single page cockpit. For the demo, a paper copy of the firm seeded with the live books ran its committee overnight on five names with memory switched on, in an isolation mode that blanks broker credentials and never touches the live firm. In that run QQQ, an ETF, came back HOLD at 45. It cited firm lesson 6 and the firm's own June 16 buy of QQQ, which lost 3.5 percent against the S&P 500, and both checks passed. Retrieval is hybrid. BM25 catches exact language, latent semantic vectors from TF IDF and a truncated SVD catch paraphrase, and reciprocal rank fusion merges them, with a point in time filter on both the memos and their outcomes. Claude runs through the Claude Code CLI. The archive was built from the firm's own research log and graded with real prices from yfinance. The console replays recorded Claude answers so the demo works offline, while every guardrail reruns live. A 64 check test suite covers look ahead, citations, grounding, the audit chain, dataset leakage and the HTTP routes, and the engine's own 1,104 check suite still passes with the memory wired into its judge prompts.

Challenges I ran into

Look ahead bias is everywhere in finance data. A memo written in July is harmless, but its August outcome must stay invisible to a decision made in July, so every memo carries the date its grade became knowable and the retriever, the guardrails and the tests all enforce it. The hardest moment was the result itself. My walk forward test showed that letting memory veto trades would not have helped, because momentum reversed in July and repeating what worked last time chased the last market. I kept that result and designed around it, so memory informs the committee and never overrules it.

Accomplishments that I am proud of

A working RAG system over real, graded investment decisions, not a toy dataset. Citations that are checked, not just requested. A fine tuning pipeline with zero leakage by construction. And a pitch that shows the number most AI pitches hide.

What I learned

Memory has to be measured, time aware and never trusted blindly. The AI's typical conviction band, 60 to 69, was right only 37% of the time, and the firm's own review had flagged the same weakness. Retrieval makes that lesson impossible to forget.

What is next for Loch Raven Capital

A larger archive, embedding retrieval behind the same point in time filter, training an open model on the RAFT data and testing it on held out months, and a calibration layer that turns raw conviction into an honest probability.

Transparency

The trading engine was built from June to September 2026 and is imported in the repository's first commit, labeled as such. Everything in every later commit, the whole Institutional Memory layer, its console, its tests and its documentation, was built during hackUMBC 2026.

Built With

Share this project:

Updates

Submission history