Hello Everyone,

Could anyone help me to find a code to calculate the following equation? I am trying to calculate the average value of excess return with geometrically declining weights using 12 months. The equation is in the attached picture:
Array

Where : ϕ = 2 -1/3.


Best