Skip to main content
All Questions

Backtest a strategy that invests each day in proportion to each stock's last positive return. Return the mean and standard deviation of its daily log returns.

Unlock detailed company stats for this questionUpgrade
Backtest this strategy on an N by T array of end-of-day prices: each day invest your capital in proportion to each stock's last observed return among stocks with a positive return, hold nothing in stocks with a negative return, and stay in cash if no return was positive (fractional shares allowed, rebalance each day). Return the average daily log return and the standard deviation of daily log returns of the strategy. Worked example: stocks A and B with 1 million USD; day 1 returns of 15% and 5% give a 3/4 and 1/4 split; on day 2 B falls, so all money moves to A.

Community answers

No answers contributed by the community yet.

Related courses

Course

SQL Interview Prep Course

Prepare for SQL interviews with lessons on joins, aggregations, and window functions, then practice real SQL interview questions in an interactive editor with expert solutions.

Course

Data Science Interview Prep

Land your dream data science role at Google, Amazon, Microsoft, Meta, Apple, and other top companies. Learn from mock interviews, frameworks, and advice from senior candidates. Practice statistics, experimentation, coding, SQL, machine learning, behavioral interviews, and more.