Portfolio Value at Risk - A conceptual problem

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Portfolio Value at Risk - A conceptual problem

Amy Milano
Dear all,

I am having following conceptual problem when I am trying to find out Value at Risk (VaR) for the portfolio. I am just giving an indicative portfolio.

(a) stocks (equity) of 3 different companies say e.g.

E1   500 equity shares
E2 1000 equity shares
E3   100 equity shares

I have closing prices for last 1 year (i.e. say 250 days) and thus I obtain 250 portfolio values by multiplying the respective number of equity shares by respective closing prices and add them.

Thus, I have 250 portfolio values. I obtain 249 portfolio returns using "LN".

Problem (A)

My problem is is my method of calculating returns correct?
In the sense, should I calculate returns for all these 3 companies separately (unlike calculating the portfolio value by adding the values of these 3 companies together) and then carry out the further analysis like calculating the correlation matrix etc.

Problem (B)

If I were to consider returns separately for the above three companies, what will happen if there are say 5000 companies (equity only) in my portfolio? How do I handle these many companies?

Problem (C)

How do I proceed if besides having equity, I also have debt and forex transactions also. (Please note that I am asking these questions (especially Problem (C) form calculating returns point of view as say for Forex transactions, I consider the spot exchange rates and the LIBOR rates (depending on the currency and the maturity period) as risk factors and calculate the Mark to Market (MTMs) values.

So my problem basically is how do I arrive at returns in a portfolio.

I apologize if I have not put up the problem in correct and short words. Please forgive and guide me,

With regards

Amy







     
        [[alternative HTML version deleted]]


_______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only. If you want to post, subscribe first.
-- Also note that this is not the r-help list where general R questions should go.
Reply | Threaded
Open this post in threaded view
|

Re: Portfolio Value at Risk - A conceptual problem

Patrick Burns-2
You can use the valuation of the whole
portfolio to calculate the returns.
That is probably the easiest approach.
That should reduce your Problem C -- it
shouldn't matter what your assets are
as long as you have valuations for them
at each timepoint.

I'm guessing that you might have tried
approach B and got a different answer.
If so, then the following should tell
you what went wrong:
http://www.portfolioprobe.com/2010/10/04/a-tale-of-two-returns/
(You can do it that way, but it's a bit
trickier.)

On 20/10/2010 10:41, Amy Milano wrote:

> Dear all,
>
> I am having following conceptual problem when I am trying to find out Value at Risk (VaR) for the portfolio. I am just giving an indicative portfolio.
>
> (a) stocks (equity) of 3 different companies say e.g.
>
> E1   500 equity shares
> E2 1000 equity shares
> E3   100 equity shares
>
> I have closing prices for last 1 year (i.e. say 250 days) and thus I obtain 250 portfolio values by multiplying the respective number of equity shares by respective closing prices and add them.
>
> Thus, I have 250 portfolio values. I obtain 249 portfolio returns using "LN".
>
> Problem (A)
>
> My problem is is my method of calculating returns correct?
> In the sense, should I calculate returns for all these 3 companies separately (unlike calculating the portfolio value by adding the values of these 3 companies together) and then carry out the further analysis like calculating the correlation matrix etc.
>
> Problem (B)
>
> If I were to consider returns separately for the above three companies, what will happen if there are say 5000 companies (equity only) in my portfolio? How do I handle these many companies?
>
> Problem (C)
>
> How do I proceed if besides having equity, I also have debt and forex transactions also. (Please note that I am asking these questions (especially Problem (C) form calculating returns point of view as say for Forex transactions, I consider the spot exchange rates and the LIBOR rates (depending on the currency and the maturity period) as risk factors and calculate the Mark to Market (MTMs) values.
>
> So my problem basically is how do I arrive at returns in a portfolio.
>
> I apologize if I have not put up the problem in correct and short words. Please forgive and guide me,
>
> With regards
>
> Amy
>
>
>
>
>
>
>
>
> [[alternative HTML version deleted]]
>
>
>
>
> _______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> -- Subscriber-posting only. If you want to post, subscribe first.
> -- Also note that this is not the r-help list where general R questions should go.

--
Patrick Burns
[hidden email]
http://www.burns-stat.com
http://www.portfolioprobe.com/blog

_______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only. If you want to post, subscribe first.
-- Also note that this is not the r-help list where general R questions should go.
Reply | Threaded
Open this post in threaded view
|

Re: Portfolio Value at Risk - A conceptual problem

braverock
In reply to this post by Amy Milano
On Wed, 20 Oct 2010 02:41:43 -0700 (PDT), Amy Milano
<[hidden email]>
wrote:

> Dear all,
>
> I am having following conceptual problem when I am trying to find out
> Value at Risk (VaR) for the portfolio. I am just giving an indicative
> portfolio.
>
> (a) stocks (equity) of 3 different companies say e.g.
>
> E1   500 equity shares
> E2 1000 equity shares
> E3   100 equity shares
>
> I have closing prices for last 1 year (i.e. say 250 days) and thus I
> obtain 250 portfolio values by multiplying the respective number of
equity
> shares by respective closing prices and add them.
>
> Thus, I have 250 portfolio values. I obtain 249 portfolio returns using
> "LN".
>
> Problem (A)
>
> My problem is is my method of calculating returns correct?

No.

Don't worry about weights yet.  Get the returns for each individual series
before sorting out your portfolio weights.  You have all the information,
so you should use it.

The function 'Return.calculate' from 'PerformanceAnalytics' will do what
you want, but the calculation isn't hard.  If 'pr' is your variable of
prices,

pr/Lag(pr, k = 1) - 1

will give you simple returns (which I typically recommend using with daily
series), or

diff(log(pr))

will give you compound returns.  I typically want a simple return series
for each asset, and will turn it into a compound series later, only if
required, to look at total portfolio return. Sticking with simple returns
avoids adding compounding estimation errors into your calculations later
on.

You want to calculate returns on each price series without worrying about
your invested amount.  It makes everything else simpler.

> In the sense, should I calculate returns for all these 3 companies
> separately (unlike calculating the portfolio value by adding the values
of
> these 3 companies together) and then carry out the further analysis like
> calculating the correlation matrix etc.


There's a function for VaR too that is likely more sophisticated than
anything you would do by hand...

Typically, if you have all the information, why wouldn't you use it?

If you have a simple or compound return series for all the instruments in
your portfolio, then you can readily calculate the portfolio return,
portfolio risk, and contributions to risk.  All you need are weights.  Take
the capital required to establish each of your positions, add it all up.
this is 100% of your capital.  Now, the capital for opening each position
divided by the total capital is the percent weight you've invested in each
position.

The function 'Return.portfolio' will take your per-instrument returns, and
calculate your portfolio return (assuming no rebalancing, though there's a
function for that too). It can also calulate you 'contribution' to total
return from each of the assets.


> Problem (B)
>
> If I were to consider returns separately for the above three companies,
> what will happen if there are say 5000 companies (equity only) in my
> portfolio? How do I handle these many companies?


See above.  These functions are routinely used on very large portfolios.

 
> Problem (C)
>
> How do I proceed if besides having equity, I also have debt and forex
> transactions also. (Please note that I am asking these questions
> (especially Problem (C) form calculating returns point of view as say
for
> Forex transactions, I consider the spot exchange rates and the LIBOR
rates
> (depending on the currency and the maturity period) as risk factors and
> calculate the Mark to Market (MTMs) values.


If you have a series of MTM 'prices' use these in step A above.


> So my problem basically is how do I arrive at returns in a portfolio.
>
> I apologize if I have not put up the problem in correct and short words.
> Please forgive and guide me,

Hopefully this helps.

You should find most of the other functions you need for univariate and
portfolio risk (SharpeRation, VaR, ES, etc.) in PerformanceAnalytics as
well.

Regards,

   - Brian

--
Brian G. Peterson
http://braverock.com/brian/
Ph: 773-459-4973
IM: bgpbraverock

_______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only. If you want to post, subscribe first.
-- Also note that this is not the r-help list where general R questions should go.
Reply | Threaded
Open this post in threaded view
|

Re: Portfolio Value at Risk - A conceptual problem

Arun.stat
In reply to this post by Patrick Burns-2
Dear Amy, assuming you have sufficient amount of historical data, you should calculate return collectively, because calculating return separately will destroy the correlation pattern implicit within the historical quotes therefore you may not address properly the diversification effect in your VaR figure.

Instead of directly valuing portfolio (and then portfolio return) based on historical quotes I would prefer to find out the historical realized return (may be logarithmic or percentage) and construct a hypothetical price distribution (by taking antilog or something like) for next day (assuming VaR horizon is 1 day) and then find the possible distribution of portfolio values for next day. This always makes sense as price series is never stationary/stable but returns are. Here the fact is to find answer like, previously on some date I got that return therefore what if same return gets realized from 1 day holding. This inference you can never make had you taken raw price because 1 year back price may be 50pt lower than current level, hence in a single day you can never achieve that level (ofcourse assuming tomorrow another layman brother would not fall on your head!) of price but with return you can.

Thanks,
Arun
Reply | Threaded
Open this post in threaded view
|

Re: Portfolio Value at Risk - A conceptual problem

braverock
On 10/20/2010 08:24 AM, Arun.stat wrote:

>
> Dear Amy, assuming you have sufficient amount of historical data, you should
> calculate return collectively, because calculating return separately will
> destroy the correlation pattern implicit within the historical quotes
> therefore you may not address properly the diversification effect in your
> VaR figure.
>
> Instead of directly valuing portfolio (and then portfolio return) based on
> historical quotes I would prefer to find out the historical realized return
> (may be logarithmic or percentage) and construct a hypothetical price
> distribution (by taking antilog or something like) for next day (assuming
> VaR horizon is 1 day) and then find the possible distribution of portfolio
> values for next day. This always makes sense as price series is never
> stationary/stable but returns are. Here the fact is to find answer like,
> previously on some date I got that return therefore what if same return gets
> realized from 1 day holding. This inference you can never make had you taken
> raw price because 1 year back price may be 50pt lower than current level,
> hence in a single day you can never achieve that level (ofcourse assuming
> tomorrow another layman brother would not fall on your head!) of price but
> with return you can.

I prefer to have all the individual returns so that I can also do
component risk contribution.  If you simply use univariate portfolio
returns, you lose the interdependence between the assets, and can't find
out the *contribution* to the overall portfolio risk, only the result.
Component risk measures sum to the univariate portfolio risk, so you get
that too.

# e.g.
######

require(PerformanceAnalytics)
data(edhec)
VaR(edhec,portfolio_method="component")
ES(edhec,portfolio_method="component")

######

Weights, of course, may also be applied.

Cheers,

    - Brian

--
Brian G. Peterson
http://braverock.com/brian/
Ph: 773-459-4973
IM: bgpbraverock

_______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only. If you want to post, subscribe first.
-- Also note that this is not the r-help list where general R questions should go.
Reply | Threaded
Open this post in threaded view
|

Re: Portfolio Value at Risk - A conceptual problem

Amy Milano
In reply to this post by Amy Milano

Dear sirs,

Thanks a lot for your valuable inputs. That will certainly help me to look ahead and understand the Value at Risk in a right perspective.

Regards

Amy


--- On Wed, 10/20/10, Brian G. Peterson <[hidden email]> wrote:

From: Brian G. Peterson <[hidden email]>
Subject: Re: [R-SIG-Finance] Portfolio Value at Risk - A conceptual problem
To: "Arun.stat" <[hidden email]>
Cc: [hidden email]
Date: Wednesday, October 20, 2010, 2:28 PM

On 10/20/2010 08:24 AM, Arun.stat wrote:
>
> Dear Amy, assuming you have sufficient amount of historical data, you should
> calculate return collectively, because calculating return separately will
> destroy the correlation pattern implicit within the historical quotes
>
 therefore you may not address properly the diversification effect in your

> VaR figure.
>
> Instead of directly valuing portfolio (and then portfolio return) based on
> historical quotes I would prefer to find out the historical realized return
> (may be logarithmic or percentage) and construct a hypothetical price
> distribution (by taking antilog or something like) for next day (assuming
> VaR horizon is 1 day) and then find the possible distribution of portfolio
> values for next day. This always makes sense as price series is never
> stationary/stable but returns are. Here the fact is to find answer like,
> previously on some date I got that return therefore what if same return gets
> realized from 1 day holding. This inference you can never make had you taken
> raw price because 1 year back price may be 50pt lower than current level,
> hence in a single day you can never
 achieve that level (ofcourse assuming
> tomorrow another layman brother would not fall on your head!) of price but
> with return you can.

I prefer to have all the individual returns so that I can also do component risk contribution.  If you simply use univariate portfolio returns, you lose the interdependence between the assets, and can't find out the *contribution* to the overall portfolio risk, only the result. Component risk measures sum to the univariate portfolio risk, so you get that too.

# e.g.
######

require(PerformanceAnalytics)
data(edhec)
VaR(edhec,portfolio_method="component")
ES(edhec,portfolio_method="component")

######

Weights, of course, may also be applied.

Cheers,

   - Brian

-- Brian G. Peterson
http://braverock.com/brian/
Ph: 773-459-4973
IM:
 bgpbraverock

_______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only. If you want to post, subscribe first.
-- Also note that this is not the r-help list where general R questions should go.



     
        [[alternative HTML version deleted]]


_______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only. If you want to post, subscribe first.
-- Also note that this is not the r-help list where general R questions should go.