Module 5Collections LabLesson 7 of 825 min
Pipeline Lab: Prices to Stats
prices → returns → mean/std → annualized vol.
Lab goals
- Vec of prices
- simple returns via windows
- mean and sample std
- annualize with sqrt(252)
Print intermediates at each stage.
Challenge
Repeat with log returns and compare ann vol.
Tips
- n-1 sample std
- Print intermediates
- Reused in Module 8
Try it live
Pipeline Lab: Prices to StatsRust 2021
Loading editor…
Output
Press Run to compile and execute.