Inside the product
One concept, carried through four kinds of work
Real curriculum content · illustrative historical prices
Lesson · Simple Return
01 · Module 3 · 5 min
Measure a gain or loss relative to the value at the start of the interval.
r = V₁ / V₀ − 1
Return stays decimal until display.
Practice · Calculate it
02 · Beginner · 4 min
A share price moves from $50 to $54. What is the simple return?
- 4%
- 8%
- 10%
- 108%
Code · Build the function
03 · Browser Python · Pyodide
def simple_return(
start_price,
end_price,
):
if start_price <= 0:
raise ValueError("invalid start")
ratio = end_price / start_price
return ratio - 1Apply · Inspect the interval
04 · Stock Lookup · historical sample
Sample values explain the workflow; they are not a live quote or an investment result.
