Continuous Logarithmic Returns - Quant Researcher Interview Question
Difficulty: Easy
Category: data_manipulation
Asked at: D.E. Shaw, Akuna, Citadel, Two Sigma, WorldQuant
Topics: polars, financial_math, time_series, preprocessing
Problem Description
Logarithmic returns, or continuously compounded returns, are preferred in quantitative finance due to their time-additivity property, which simplifies multi-period aggregation and statistical modeling. Unlike simple arithmetic returns, log returns allow for the summation of periodic returns to determine the total return over a timeframe, facilitating easier manipulation in time-series analysis.
Task
Implement a function solution(data) using the Polars library to calculate the period-over-period
Practice this easy researcher interview question on MyntBit - the LeetCode for quants with 200+ quant interview questions for Jane Street, Citadel, Two Sigma, and other top quantitative finance firms.