{"id":"158545a7-5e97-4cb5-9391-389bb40865f0","arxiv_id":"2411.14068","paper_version":1,"verdict":"CONDITIONAL","confidence":"HIGH","novelty_score":2.0,"correctness_risk":"medium","formal_verification":"none","parameter_count":0,"one_line_summary":"The paper derives simple accounting identities that track realized and unrealized PnL in base or quote currency, including spread, with a worked SOL/USDT example.","lead":"This short guide writes down equations for tracking an algorithmic trading account's realized and unrealized profit and loss, including the bid-ask spread, as positions open and close. It is useful to quants who want a consistent performance measure, though one boundary rule is printed incorrectly.","discovery_kind":"review","skeptic_critique":{"model":"deepseek-v4-flash","headline":"The printed equations are internally inconsistent: Eq. (10) reverses the conversion rule in Eq. (3), and Eq. (5a) fails on row 4 of the worked example, so the central PnL claim is not usable as stated.","rationale":"The reader's weakest assumption identified the same core problem: the conversion-price convention for closed positions is stated inconsistently, with Eq. (10) in direct conflict with Eq. (3) and the example. My stress test confirms that this is load-bearing rather than cosmetic, because the central claim promises a series of equations that track total PnL; if a reader cannot tell whether a profitable long close is converted at x_i or x'_i, the equations do not determine the advertised quantity. I also verified the secondary issues: row 3's q sign is a typo that the table's own xbar value contradicts, and Eq. (5a) is violated by row 4's pq, so the base/quote relation is not consistent across the paper. These are fixable errors, and the accounting framework itself is elementary and not circular, so a conditional verdict is appropriate. I do not see a deeper conceptual flaw in the intended convention; the problem is that the printed formalism does not uniquely specify it.","tokens_in":4630,"tokens_out":9786,"duration_ms":89149,"concrete_test":"Recompute the six-row worked example exactly as printed, once using Eq. (3) as the definitive conversion rule and once using Eq. (10)'s substitution x'_i->x_i for closed positions, then compare to the published table. The contradiction is confirmed if row 4's pq changes from 200.00 to 199.6875 when Eq. (5a) is enforced, or if row 6's pb changes from 1.527165 when Eq. (10) is applied. A single independent implementation of the example with the formulas as written will expose the inconsistency.","verdict_should_be":"UNCHANGED","load_bearing_attack":"The paper's central claim is that Eqs. (1)-(9) track total realized and unrealized PnL in base or quote units. The weakest point is the treatment of closed positions (b_i=0), where the conversion price is not uniquely specified. Eq. (3) defines the base-currency PnL at b_i=0 using a table: for b_{i-1}>0 with q_i>0 it uses xhat=x'_i; for b_{i-1}<0 with q_i<0 it uses xhat=x'_i and mu=-s; in the opposite-sign cases it uses xhat=x_i. Eq. (10) then states that for b_i=0 one should replace x'_i by x_i exactly when (b_{i-1}>0 and q_i>0) or (b_{i-1}<0 and q_i<0). This is the negation of Eq. (3)'s replacement rule, so the two equations cannot both be correct: implementing Eq. (3) and implementing Eq. (10) give different PnL on the same trade sequence. The worked example compounds the problem. Row 3 prints q=-1000, but the displayed xbar_3=200 requires q=+1000. In row 4, pb_4=1.25 and x'_4=159.75, so Eq. (5a) predicts pq_4=199.6875, not the tabulated 200.00; row 6 matches only if the conversion price is x'_6=170.25, contrary to Eq. (10)'s instruction. These are not competing legitimate accounting conventions but inconsistent specifications of one convention: the same inputs produce different PnL values depending on which printed rule is followed.","agreement_with_reader":"agree"},"referee_report":{"model":"deepseek-v4-flash","summary":"The paper presents a bookkeeping framework for computing realized and unrealized profits and losses (PnL) of algorithmic spot trading strategies, explicitly incorporating the bid/ask spread. The authors define base and quote balances, an average entry price, and formulas for PnL in base and quote units, as well as a wealth-based formulation and performance measures. A worked SOL/USDT example is used to illustrate the formulas.","tokens_in":4967,"tokens_out":14398,"duration_ms":109361,"significance":"The paper addresses a practical need: consistent PnL calculation for algorithmic trading. The core bookkeeping identity, once the conventions are fixed, is sound and would be useful for backtesting and live monitoring. The worked example, despite errors, helps illustrate the intended meaning. The main value is pedagogical and practical, not a novel research result. However, the current manuscript contains several internal inconsistencies in the central equations, and a reader cannot implement the formulas as printed. The potential utility is real, but only after corrections.","major_comments":[{"comment":"The replacement rule in Eq. (10) is the opposite of the table in Eq. (3). Eq. (10) states that x'_i should be replaced by x_i for b_i=0 exactly when (b_{i-1}>0 ∧ q_i>0) or (b_{i-1}<0 ∧ q_i<0); however, Eq. (3)'s table sets \\hat{x}=x'_i in precisely those two cases and \\hat{x}=x_i in the complementary cases. Therefore, following Eq. (3) and following Eq. (10) produce different PnL values for the same closing trade. For instance, in the worked example row 6, b_{i-1}>0 and q_i>0, so Eq. (10) instructs using x_i=170.00, whereas Eq. (3) correctly uses \\hat{x}=x'_i=170.25 to obtain 1.527165 SOL; implementing Eq. (10) would give a different result. This is a load-bearing inconsistency that must be fixed.","section":"Section 2, Eq. (10) vs. Eq. (3)"},{"comment":"The universal statement p^q_i = p^b_i x'_i does not hold for closed positions in which Eq. (3) uses \\hat{x}=x_i. The worked example row 4 reports p^b_4=1.25 and x'_4=159.75, which would give 199.6875, but the table correctly gives p^q_4=200.00, equal to q_4. The paper should restrict Eq. (5a) to b_i≠0 and define p^q_i generally by Eq. (9b), i.e., p^q_i = x'_i b_i + q_i, which yields the correct closed-position value. As written, Eq. (5a) is not a valid general identity.","section":"Section 2, Eq. (5a)"},{"comment":"The example contains several numerical errors that obscure the verification of the formulas. Row 3 lists q=-1000, but the displayed \\bar{x}_3=200 requires q=+1000 (since q_3 = -2600 + 180×20 = 1000). The second row of the first table has u=5 while the action states 'Buy 10 SOL'; the correct u=10 appears in the Section 3 table. The second table's row 2 gives x'=174.25, which should be 174.75 to reproduce p^b_2=0.121602. These typos need correction for the example to serve as a reliable check.","section":"Worked example in Section 2"},{"comment":"The conversion convention for closed positions—converting quote-denominated PnL to base units at either the bid or ask depending on the sign of the prior position and the final quote balance—is presented as the unique calculation, but it is an accounting choice. A different convention (e.g., always at mid-price or always at the transaction price) would yield different base-currency PnL figures. The paper should explicitly acknowledge that this is one possible convention and note that the claimed PnL values are convention-dependent, not unique market invariants.","section":"General convention (Section 2 and 4)"}],"minor_comments":[{"comment":"The subscripts 'i-i' should be 'i-1' in both equations.","section":"Eq. (4) and Eq. (5b)"},{"comment":"The second row's 'u' column shows 5, but the action text says 'Buy 10 SOL'; the correct value is 10, as used in the Section 3 table.","section":"First table in Section 2"},{"comment":"The x' value for row 2 is printed as 174.25, but the first table shows 174.75; these should be consistent.","section":"Second table in Section 2"},{"comment":"The word 'caclculated' is a typo for 'calculated'.","section":"Sentence following Eq. (4)"},{"comment":"The symbols ~b_i and ~q_i are used without a clear inline definition; consider defining them as b_i/B and q_i/B, respectively, before the performance table.","section":"Section 3 notation"},{"comment":"The paper uses \\bar{x}_i = -q_i/b_i even when b_i=0 (where it is undefined) in the context of Eq. (3); this should be stated as applying to b_i≠0, with the closed-position case handled separately by the table.","section":"Eq. (2) usage"}],"recommendation":"major_revision","confidential_remarks":"This is a short practical guide rather than a research contribution. The core idea is simple and potentially useful, but the current text is not self-consistent: Eq. (10) directly contradicts Eq. (3), and Eq. (5a) fails in the paper's own example. These issues are likely fixable, but they are central to the advertised formulas, so a major revision is appropriate. Please ask the authors to reconcile the equations and correct the worked example before publication."},"author_rebuttal":null,"desk_editor":{"model":"deepseek-v4-flash","letter":"Short version: this is a decent pedagogical note on PnL bookkeeping for spot trades, with a worked SOL/USDT example, but as printed it cannot be used literally because two general formulas contradict the example. The core accounting identities are right; the packaging is sloppy.\n\nWhat's actually here: Eqs. (1)-(3) and (9) are standard position accounting — cumulative units, cumulative traded notional, average entry, and mark-to-market PnL expressed in base or quote. That is not new, and the paper doesn't claim otherwise. The useful bit is how it handles the bid-ask spread when a position closes: whether to convert a closed PnL at the bid or the ask depends on whether the close is a profit or loss and on the prior direction. That convention is laid out clearly in the table in Eq. (3) and it works on the example. The wealth section just rewrites the same identities. If you need a compact reference for a crypto algo-trading desk, the structure is fine.\n\nThe soft spots are real. The table in the worked example has q=-1000 after selling 20 SOL at 180; the correct value is +1000, and the subsequent xbar=200 forces that sign. More importantly, Eq. (5a) says p^q_i = p^b_i x'_i for all i, but row 4 of the example only matches if you convert at x_i=160, not x'_i=159.75. The correct statement is p^q_i = p^b_i xhat_i, where xhat_i is the conversion price fixed by Eq. (3). And Eq. (10) states the opposite replacement rule from Eq. (3): it tells you to use x_i when Eq. (3) says use x'_i, and vice versa. That is not a competing convention; it is a mistake. If a reader implements Eq. (10), the final PnL changes.\n\nThese are fixable, but they sit in the advertised formulas, so the guide as printed is not reliable. I'd want a corrected version before recommending it. For what it is — a short expository note for practitioners — it is useful and the core is sound after a few sign edits. As a research contribution it is not significant. I would not bring it to a research reading group and would not cite it in my own work, but if a practitioner journal is considering it, a referee can verify the corrections in an hour.","headline":"Useful practitioner note on spread-aware PnL bookkeeping, but the printed conversion rules contradict the worked example and need correction before it can be trusted.","tokens_in":5516,"tokens_out":7951,"would_cite":false,"duration_ms":70886,"reading_group":"no","serious_thinker":"yes","would_accept_peer_review":true},"rs_alignment":null,"lean_confirmation":null,"pith_extraction":{"msc":[],"pacs":[],"model":"deepseek-v4-flash","headline":"This paper aims to show that a spot-trading sequence's total PnL, spread included, can be read off at any time from two running balances.","keywords":["profit and loss calculation","algorithmic trading","bid-ask spread","realized and unrealized PnL","base and quote currency","spot trading","balance-sheet bookkeeping"],"falsifier":"Recompute the six-trade SOL/USDT example literally from Eq. (10) as printed; if the printed condition is followed, the final base-currency PnL will not equal 1.527165 SOL. Re-running the same trades while converting the closing quote profit at the other side of the spread will change the base PnL, confirming that the convention, not the market prices, determines the number.","tokens_in":4356,"feed_emoji":"📈","tokens_out":6699,"duration_ms":58433,"temperature":0.7,"pith_summary":"This paper puts forward a bookkeeping method for scoring spot-trading strategies. It keeps two running balances—one in the base currency, one in the quote currency—marks buys at the ask and sells at the bid, and reads the total realized and unrealized PnL off those balances at any time. The payoff is that an algorithm's performance can be reduced to one number, in either base or quote units, with the spread included and without waiting for positions to close. A six-trade SOL/USDT example walks the equations through to a final profit of 1.527165 SOL (260 USDT), and the authors present the formalism as a basis for evaluating trading-model algorithms.","feed_headline":"PnL formulas score any spot-trading run at any moment, spread included","feed_subtitle":"A worked SOL/USDT sequence closes at 1.527165 SOL (260 USDT), with the same profit in base, quote, or wealth terms.","key_machinery":"The load-bearing object is a two-column balance sheet that tracks the base and quote positions as trades happen, $b_i$ and $q_i$ as in Eq. (1), with buys marked at the ask and sells at the bid. Eq. (2) defines $\\bar{x}_i$, the unrealized average price; Eq. (3) converts the position into PnL in base units, including a separate branch for the moment a position closes, $b_i = 0$. The closing branch is the delicate part: whether $x_i$ or $x_i'$ is used depends on the direction of the prior position and on whether the close realizes a gain or a loss. Eq. (9) provides an equivalent route by benchmarking wealth against a portfolio with no trading.","core_discovery":"The central claim is that the total profit or loss of any sequence of spot trades, realized and unrealized, is completely determined by two running sums, $b_i = \\sum_{j=1}^i u_j$ and $q_i = -\\sum_{j=1}^i x_j u_j$, where $x_j$ is the bid or ask price actually transacted at each step. The unrealized average entry price is $\\bar{x}_i = -q_i/b_i$, and PnL in base units follows from Eq. (3); in quote units it is $p_i^q = p_i^b x_i'$, where $x_i'$ is the opposite side of the spread. The same result emerges from Eq. (9), which compares wealth to a no-trading benchmark. The worked SOL/USDT table shows all three routes landing on the same final profit: 1.527165 SOL, or 260 USDT.","pith_inferences":["This reader's extension: the close-case conversion is an accounting convention rather than a market identity, so two backtesters can report different base-currency PnL on identical trades by converting quote profit at bid instead of ask; a tool built on these equations should state which of the four cases maps to which price.","This reader's extension: Eq. (10) as printed contradicts the worked example's use of the closing convention, so an implementation should pin the four cases from the table in Eq. (3) rather than copy Eq. (10) verbatim.","This reader's extension: running the equations on recorded exchange order history and comparing against the exchange's settlement records would test the convention's practical adequacy; any mismatch would show where the sign-dependent conversion diverges."],"forward_implications":["Any sequence of spot trades can be scored at any moment; total PnL is available before positions close.","PnL can be reported in base or quote currency, so strategies running on different currency pairs can be compared on one number.","Dividing trade sizes by initial balance turns the PnL into percentages, and those percentages can be compounded into a total return.","Trading fees can be folded in by deducting them from the per-trade PnL in the currency they are charged.","Wealth can be separated into a market-driven component and the algorithm's contribution by benchmarking against a no-trading portfolio."],"supporting_citations":[],"fun_headline_variants":["Two running sums capture all spot-trade PnL, spread included","PnL from any trade sequence: just track two running sums","Realized and unrealized PnL from two sums, spread included","Spot-trade PnL: two running sums do all the work, spread on","Forget complex books: PnL is just two sums, spread included"],"cache_read_input_tokens":3200,"weakest_assumption_plain":"Everything rests on a sign-dependent bookkeeping convention: when a position closes, quote-denominated profit is converted to base units at the ask for profitable closes and the bid for losing closes; the paper's Eq. (10) prints the opposite sign condition from the one its own example uses.","fun_headline_variants_meta":{"raw":{"variants":["Two running sums capture all spot-trade PnL, spread included","PnL from any trade sequence: just track two running sums","Realized and unrealized PnL from two sums, spread included","Spot-trade PnL: two running sums do all the work, spread on","Forget complex books: PnL is just two sums, spread included"]},"model":"deepseek-v4-flash","effort":"low","cost_usd":0.000605,"raw_usage":{"total_tokens":2732,"prompt_tokens":764,"completion_tokens":1968,"prompt_tokens_details":{"cached_tokens":384},"prompt_cache_hit_tokens":384,"prompt_cache_miss_tokens":380,"completion_tokens_details":{"reasoning_tokens":1870}},"tokens_in":380,"tokens_out":1968,"duration_ms":12520,"temperature":1.0,"reasoning_tokens":1870,"cache_read_input_tokens":384,"cache_creation_input_tokens":0},"cache_creation_input_tokens":0},"created_at":"2026-08-12T15:35:12.982007+00:00","model_set":{"reader":"deepseek-v4-flash"},"falsifier":"Recompute the six-trade SOL/USDT example literally from Eq. (10) as printed; if the printed condition is followed, the final base-currency PnL will not equal 1.527165 SOL. Re-running the same trades while converting the closing quote profit at the other side of the spread will change the base PnL, confirming that the convention, not the market prices, determines the number.","supporting_citations":[],"review_version":1}