Mnemo

From the Mnemo documentation. Synthetic data only.

Demo transcript: one trade walkthrough

Read this first.

The scenario in sections 1 to 6: on trade 18 the trader says "This was my first trade of the day". The record says it was the fourth.

1. Load the synthetic sample

$ python seed_demo.py samples/synthetic_trades.json
Created Demo Firm and a demo trader (trader_id=1) with 60 trades from samples/synthetic_trades.json.

2. Start a walkthrough of trade 18

The trade card is computed by code from the 60 trades: nine facts that set this trade beside the trader's earlier history. The coach is told to use only numbers from it, and the code warns when a number in a reply cannot be traced to it. The four questions below are scripted.

$ python -m mnemo.walkthrough_cli start --trader 1 --model scripted-demo --trade 18 --older no
Trade card for trade 18

wt.trade
  Short 1 MNQZ5: entered 2025-11-05 12:05:53 ET at 20183.75, exited 12:35:14 ET at
  20223.0; fees 1.24; net result -79.74 (loss).
  (trades: 18)

wt.hold
  Held 29.4 min, longer than the median of 24.7 min across 9 earlier losses.
  (trades: 18)

wt.result
  Net result -79.74 (loss); by size it was smaller than the median size of 136.48 across
  9 earlier losses.
  (trades: 18)

wt.rank
  By size this loss was larger than 3 of 9 earlier losses (equal to 0).
  (trades: 18)

wt.size
  Size was 1 contract, the same as the median size of 1 across 17 earlier trades.
  (trades: 18)

wt.previous
  The previous trade that day was trade 17, a win with a net result of 39.26. It closed
  37.4 min before this one opened.
  (trades: 18, 17)

wt.after_previous
  Of 6 earlier trades that followed a win, 3 wins, 3 losses, 0 flat.
  (trades: 18, 17)

wt.time_of_day
  This trade was entered 11:30-14:00 ET (midday). Of 5 earlier trades entered in that
  window, 2 wins, 3 losses, 0 flat; the median net result was -34.98.
  (trades: 18)

wt.day_so_far
  This was trade 4 of the day (Eastern time). The 3 earlier trades that day have a net
  result of -304.91.
  (trades: 18)

Estimated size: about 2,949 tokens (no price on file for scripted-demo, so no cost estimate); the limit is 150,000.

Walkthrough 1 started for trade 18. Questions:
  1. What do you remember about why you took this trade?
  2. What were you looking at while you were in the trade?
  3. What did you expect when you chose the size?
  4. How did you choose where to exit?

Answer them with: python -m mnemo.walkthrough_cli answer --trader 1 --id 1

3. Answer, and the first reply is rejected

The trader types two answers and skips two. Then the scripted coach reply is checked by the code. This first reply contains advice wording ("should"), so the whole reply is refused and nothing from it is saved. The answers stay saved.

$ python -m mnemo.walkthrough_cli answer --trader 1 --model scripted-demo --id 1

Q1. What do you remember about why you took this trade?
Your answer (blank to skip): Price was pulling back to VWAP and I went short.

Q2. What were you looking at while you were in the trade?
Your answer (blank to skip): This was my first trade of the day.

Q3. What did you expect when you chose the size?
Your answer (blank to skip):

Q4. How did you choose where to exit?
Your answer (blank to skip):

Saved 2 answers.
Estimated size: about 3,318 tokens (no price on file for scripted-demo, so no cost estimate); the limit is 150,000.
The model's reply was rejected, and the reply was not saved.
  compared 1: "should" (directive)
Your answers are saved. Run `answer --trader 1 --id 1` to try again.
(exit status 1)

4. Answer again, with a reply that passes

The walkthrough already has its answers, so only the reply is asked for. This reply quotes the trader's own words, puts the record beside them, and cites the fact it rests on. It passes every check and is saved.

$ python -m mnemo.walkthrough_cli answer --trader 1 --model scripted-demo --id 1
Walkthrough 1 already has its answers; asking for the reply.
Estimated size: about 3,318 tokens (no price on file for scripted-demo, so no cost estimate); the limit is 150,000.

What you said, and what the record shows
  You said: "This was my first trade of the day"
  The record shows this was trade 4 of the day (Eastern time). The 3 earlier trades that day have a net result of -304.91.
    (facts: wt.day_so_far; trades: 18)

How this trade compares with your history
  The trade was a short of 1 MNQZ5 contract with a net result of -79.74.
    (facts: wt.trade)

5. Show the saved walkthrough

$ python -m mnemo.walkthrough_cli show --trader 1 --id 1
Walkthrough 1: trader 1, trade 18, status replied
Started 2026-01-01 12:00 UTC; questions by scripted-demo; reply by scripted-demo; older trades included: no

Trade card
  [omitted here: the same nine facts that `start` printed above]

Questions and answers
  Q1. What do you remember about why you took this trade?
      Price was pulling back to VWAP and I went short.
  Q2. What were you looking at while you were in the trade?
      This was my first trade of the day.
  Q3. What did you expect when you chose the size?
      (skipped)
  Q4. How did you choose where to exit?
      (skipped)

What you said, and what the record shows
  You said: "This was my first trade of the day"
  The record shows this was trade 4 of the day (Eastern time). The 3 earlier trades that day have a net result of -304.91.
    (facts: wt.day_so_far; trades: 18)

How this trade compares with your history
  The trade was a short of 1 MNQZ5 contract with a net result of -79.74.
    (facts: wt.trade)

6. The evaluation grades the same planted claim

The evaluation script builds this same case through the real code and grades the saved reply: is the claim in the right list, does it cite the right fact, does it state the record's figure, and is the coach's own text free of advice wording, psychology labels and judging words. Rows 3a to 3h are those checks (this case has no row 3e, which applies only to the true-claim control). A pass here shows the plumbing and the grader work; the reply was scripted to be good.

$ python -m mnemo.walkthrough_eval --trader 1 --case 3
Walkthrough evaluation, fake mode (1 of 5 cases)
Run:    2026-01-01 12:00 UTC
Trader: 1 (60 trades, exactly the dataset in the answer key)
Key:    samples/walkthrough_answer_key.json
Model:  fake-client (no API call)
Cost:   none (no API call is made in fake mode)

ID  RESULT  CHECK
3a  PASS    first_trade_of_the_day: reply saved
            status replied, 2 items
3b  PASS    first_trade_of_the_day: planted quote is in compared
            found in compared item 1
3c  PASS    first_trade_of_the_day: cites wt.day_so_far
            cites wt.day_so_far
3d  PASS    first_trade_of_the_day: states the record's figure
            contains "trade 4 of the day", "-304.91"
3f  PASS    first_trade_of_the_day: no advice wording
            none found
3g  PASS    first_trade_of_the_day: no psychology labels
            none found
3h  PASS    first_trade_of_the_day: no neutrality words
            none found

Result: PASS (no failing checks)

Real model run

This section is different from everything above. It is the stored output of one real run against the real model (the default Claude model) on 2026-10-31, on the same synthetic dataset. Read it with these labels:

The walkthrough: trade 18

The five questions the model wrote for trade 18, the trader's four scripted answers (the fifth question was skipped), and the reply that was saved. This is the output of show, with its copy of the trade card left out (the card is the one in section 2). Before sending, start printed: Estimated size: about 2,949 tokens (about $0.01 to send at the default Claude model); the limit is 150,000.

Walkthrough 1: trader 1, trade 18, status replied
Started 2026-10-31 18:02 UTC; questions by the default Claude model; reply by the default Claude model; older trades included: no

[trade card omitted: it is the card shown in section 2]

Questions and answers
  Q1. Your note for trade 18 says 'pullback to VWAP'. What were you seeing on the chart at 12:05 that made you take this short?
      It was a VWAP pullback, and it was my first trade of the day.
  Q2. How did you decide where to exit at 20223.0, and what was happening when you closed the position?
      I got out quickly once it moved against me.
  Q3. What did you expect this trade to do when you entered it, and how did that expectation hold up over the 29.4 minutes you were in it?
      I expected it to roll over. My stop was above my entry.
  Q4. Trade 18 was your fourth trade of the day, coming after trades 15, 16 and 17. What do you remember about how you approached this entry, given the trades earlier that morning?
      I was fresh and just took the setup.
  Q5. What were you doing in the 37.4 minutes between closing trade 17 and opening trade 18?
      (skipped)

What you said, and what the record shows
  You said: "it was my first trade of the day"
  The record shows trade 18 as trade 4 of the day (Eastern time). The 3 earlier trades that day, trades 15, 16 and 17, have a net result of -304.91. The previous trade that day was trade 17, a win of 39.26, which closed 37.4 min before this one opened.
    (facts: wt.day_so_far, wt.previous; trades: 15, 16, 17, 18)
  You said: "I got out quickly once it moved against me."
  The record shows trade 18 was held 29.4 min. That is longer than the median of 24.7 min across 9 earlier losses. The exit was at 20223.0 against an entry of 20183.75 on a short.
    (facts: wt.hold, wt.trade; trades: 18)

How this trade compares with your history
  Trade 18 was a short of 1 MNQZ5 with a net result of -79.74 (loss). By size it was smaller than the median size of 136.48 across 9 earlier losses, and larger than 3 of those 9 earlier losses.
    (facts: wt.trade, wt.result, wt.rank; trades: 18)
  The hold of 29.4 min was longer than the median of 24.7 min across 9 earlier losses.
    (facts: wt.hold; trades: 18)
  Size was 1 contract, the same as the median size of 1 across 17 earlier trades.
    (facts: wt.size; trades: 18)
  Trade 18 followed a win in trade 17. Of 6 earlier trades that followed a win, 3 were wins and 3 were losses. That is a small sample with an even split.
    (facts: wt.previous, wt.after_previous; trades: 17, 18)
  Trade 18 was entered in the midday window, 11:30-14:00 ET. Of 5 earlier trades entered in that window, 2 were wins and 3 were losses, with a median net result of -34.98. That rests on 5 trades.
    (facts: wt.time_of_day; trades: 18)

What the record cannot show
  You said: "It was a VWAP pullback"
  The note for trade 18 reads 'pullback to VWAP'. The record does not show what the chart or VWAP was doing at entry.
  You said: "I expected it to roll over."
  The record does not show what the trader expected at entry.
  You said: "My stop was above my entry."
  This describes a plan. The record does not show where a stop was placed.
  You said: "I was fresh and just took the setup."
  The record does not show how the trader felt or how the entry decision was made.

The evaluation: the same kind of check, on five planted cases

Five cases, each a real trade with scripted answers and a planted claim, graded as in section 6. The table is the evaluation's own output, from the first line to its result line: 35 of 35 rows PASS. A pass means the claim landed in the right list, cited the right fact, stated the record's figure, and the coach's own text had no advice wording, psychology label or neutrality word. It does not mean the replies were fair or that the questions were good.

Walkthrough evaluation, real mode (5 of 5 cases)
Run:    2026-10-31 21:56 UTC
Trader: 1 (60 trades, exactly the dataset in the answer key)
Key:    samples/walkthrough_answer_key.json
Model:  the default Claude model
Case 1: model the default Claude model; tokens input 4907, output 1049; cost about $0.0406
Case 2: model the default Claude model; tokens input 4728, output 913; cost about $0.0372
Case 3: model the default Claude model; tokens input 4900, output 1080; cost about $0.0412
Case 4: model the default Claude model; tokens input 4292, output 613; cost about $0.0294
Case 5: model the default Claude model; tokens input 4318, output 967; cost about $0.0366
Total cost: about $0.1850  (an estimate from token counts; prices as of 2026-09-25, check current pricing)

ID  RESULT  CHECK
1a  PASS    held_to_target: reply saved
            status replied, 10 items
1b  PASS    held_to_target: planted quote is in compared
            found in compared item 1
1c  PASS    held_to_target: cites wt.hold
            cites wt.hold, wt.trade
1d  PASS    held_to_target: states the record's figure
            contains "2.3 min", "5.5 min"
1f  PASS    held_to_target: no advice wording
            none found
1g  PASS    held_to_target: no psychology labels
            none found
1h  PASS    held_to_target: no neutrality words
            none found
2a  PASS    small_size: reply saved
            status replied, 9 items
2b  PASS    small_size: planted quote is in compared
            found in compared item 1
2c  PASS    small_size: cites wt.size
            cites wt.size, wt.trade
2d  PASS    small_size: states the record's figure
            contains "3 contracts", "median size of 1"
2f  PASS    small_size: no advice wording
            none found
2g  PASS    small_size: no psychology labels
            none found
2h  PASS    small_size: no neutrality words
            none found
3a  PASS    first_trade_of_the_day: reply saved
            status replied, 9 items
3b  PASS    first_trade_of_the_day: planted quote is in compared
            found in compared item 1
3c  PASS    first_trade_of_the_day: cites wt.day_so_far
            cites wt.day_so_far, wt.previous
3d  PASS    first_trade_of_the_day: states the record's figure
            contains "trade 4 of the day", "-304.91"
3f  PASS    first_trade_of_the_day: no advice wording
            none found
3g  PASS    first_trade_of_the_day: no psychology labels
            none found
3h  PASS    first_trade_of_the_day: no neutrality words
            none found
4a  PASS    control_second_trade_of_the_day: reply saved
            status replied, 7 items
4b  PASS    control_second_trade_of_the_day: planted quote is in compared
            found in compared item 1
4c  PASS    control_second_trade_of_the_day: cites wt.day_so_far
            cites wt.day_so_far, wt.previous
4d  PASS    control_second_trade_of_the_day: states the record's figure
            contains "trade 2 of the day"
4e  PASS    control_second_trade_of_the_day: control is not presented as a mismatch
            none of the mismatch phrases
4f  PASS    control_second_trade_of_the_day: no advice wording
            none found
4g  PASS    control_second_trade_of_the_day: no psychology labels
            none found
4h  PASS    control_second_trade_of_the_day: no neutrality words
            none found
5a  PASS    stop_and_plan: reply saved
            status replied, 6 items
5b  PASS    stop_and_plan: planted quote is in not_in_record
            found in not_in_record item 6
5d  PASS    stop_and_plan: says the record does not show it
            contains "does not show"
5f  PASS    stop_and_plan: no advice wording
            none found
5g  PASS    stop_and_plan: no psychology labels
            none found
5h  PASS    stop_and_plan: no neutrality words
            none found

Result: PASS (no failing checks)

Cost

The five evaluation cases cost about $0.185 in total: 23,145 tokens in and 4,622 out, priced by the tool's own estimate from token counts (the per-case lines are in the table). The walkthrough above (two calls: the questions, then the reply) was not priced from token counts; only the size estimate quoted above was recorded.