CPPI

From ThetaWiki

Jump to: navigation, search

This simple CPPI trading strategy has a horizon of n steps over T years and

results in a portfolio Pi which denotes the money in each simulated scenario path. This simple case

manages a portfolio consisting of d stocks and a money market account. The CPPI strategy chooses d such that the portfolio value Pi never drops below the bond floor F. At each time step, the portfolio is updated according to the position d in stock S and the gain difference between the next stock price S! and its previous value S.

model CPPI
	import S	"Stock price process"
	import EUR	"Numeraire"
	import m	"Multiplier"
	import F	"Bond floor"
	import Pi_0	"Initial Portfolio value"
	import T	"Maturity time"
	import n	"Number of time steps"
	export Pi   "Portfolio value in EUR"
 
	d = (m * (100-F))/S
	Pi = Pi_0	
 
	loop n
		Pi = Pi + d*(S!-S) 
		Theta T/n
		d = max( 0,(m*(Pi-F))/S )
	end 
end
Personal tools