Gamestudio Links
Zorro Links
Newest Posts
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
Trading Journey
by howardR. 04/28/24 09:55
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
Why Zorro supports up to 72 cores?
by jcl. 04/26/24 11:09
Eigenwerbung
by jcl. 04/26/24 11:08
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (degenerate_762, AndrewAMD), 877 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
wandaluciaia, Mega_Rod, EternallyCurious, howardR, 11honza11
19049 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
VAR (Value at Risk) #475733
01/05/19 18:29
01/05/19 18:29
Joined: Feb 2018
Posts: 236
Italy
tradingest Offline OP
Member
tradingest  Offline OP
Member

Joined: Feb 2018
Posts: 236
Italy
Hi guys,

anybody use the formula or indicator to obtain the correct VAR of a portfolio strategy?

Wikipedia def
What is the VAR? Value at risk (VaR) is a measure of the risk of loss for investments. It estimates how much a set of investments might lose (with a given probability), given normal market conditions, in a set time period such as a day. VaR is typically used by firms and regulators in the financial industry to gauge the amount of assets needed to cover possible losses. For a given portfolio, time horizon, and probability p, the p VaR can be defined informally as the maximum possible loss during the time if we exclude worse outcomes whose probability is less than p. This assumes mark-to-market pricing, and no trading in the portfolio.[1] For example, if a portfolio of stocks has a one-day 5% VaR of $1 million, that means that there is a 0.05 probability that the portfolio will fall in value by more than $1 million over a one-day period if there is no trading. Informally, a loss of $1 million or more on this portfolio is expected on 1 day out of 20 days (because of 5% probability). Follow us for a good trading

Thanks

Last edited by tradingest; 01/05/19 19:14.
Re: VAR (Value at Risk) [Re: tradingest] #475768
01/07/19 16:21
01/07/19 16:21
Joined: Aug 2016
Posts: 27
M
MaskOfZorro Offline
Newbie
MaskOfZorro  Offline
Newbie
M

Joined: Aug 2016
Posts: 27
What's the question?

Never done it in Zorro, but Zorro lets you find covariances and construct a covariance matrix

Quote:
/ generate covariance matrix
for(i=0; i<N; i++)
for(j=0; j<N; j++)
Covariances[i][j] = Covariance(Returns[i],Returns[j],DAYS);


The you just need the weights vector and to perform matrix multiplication



Then multiply the portfolio value by the calculated portfolio sigma and the appropriate z-score for the confidence level you want (e.g. 1.645 for 95%).


Moderated by  Petra 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1