Question : TWAP strategy

Hi,

Does anyone has code/algorithm for TWAP (Time weighted avg price) strategy implementation?
Its a popular strategy used for front office trading of futures etc. I am using Linux

Thanks,
shy

Answer : TWAP strategy

TWAP is calculated  by dividing the sum of all trade prices by the number of total trades.  
The TWAP aims to evenly distribute
an order over user specified  duration dynamically balancing adverse selection and market impact in  real time. Typically utilised for liquid tickers, generating
many  small and frequent orders.


1:
2:
3:
4:
P(vwap) = sigma-j P-j * Q-j / sigma-j Q-j
the TWAP is easier

P(twap) = sigma-j P-j / N-j where N-j is the total number of trades
Random Solutions  
 
programming4us programming4us