[R-SIG-Finance] Questions related to R-Credit Risk

Hans Radtke hans.radtke at gutmark.net
Mon Dec 28 13:04:23 CET 2009


Dear Lisete,

I cannot claim to know all packages available, but I think that the CreditMetrics package is the only one specifically related to CreditVaR, and it does some other nice things, too - like estimating PDs out of spreads (or vice versa).

But to answer your questions: I don't think that there is anything related to LGD, as LGDs are normally estimated empirically or modelled intuitively by financial institutions. I've spent a fair amount of time on this issue and I have used R for data analysis only in this context.

With regard to loss distribution / unexpected losses / VaR (which are really the same topic, some might argue), again, CreditMetrics is probably the only dedicated package around. We have build an extremely simplistic and minimalist CreditVaR model myself, essentially implementing the Vasicek Model, which I am happy to share with you. And we are also working on an implementation of a model that's conceptually closer to the Credit Portfolio View Methodology proposed by Wilson.

Other than that, I have developed a simplistic stress-testing toolkit, applying stressed transition matrices to credit portfolios to estimate impact on Standardised and F-IRB RWAs.

You can contact me directly for further information.


Mit besten Grüßen / With kind regards
Hans Radtke
Vorstand
 
Gutmark, Radtke & Company AG
Lotzstrasse 36
65934 Frankfurt
 
Telefon  +49 69 35358-102
Telefax  +49 69 35358-100 (Office)
         +49 69 255-77374 (eFax)
Mobil    +49 162 7675407  (DE)
         +44 7798 812089  (UK)
 
 
 
Gutmark, Radtke & Company AG is incorporated under German law. Board of Directors (Vorstand): Benny Gutmark, Hans Radtke. Supervisory Board (Aufsichtsrat): Dr Jacob Gutmark, Chairman. Company Registration: HRB 53028, Amtsgericht Frankfurt. Value Added Tax Registration (USt-IdNr): DE218021594. This e-mail and any attachments are confidential and may be legally privileged. If you are not the intended recipient please notify the sender immediately and delete this email. Any dissemination, distribution, copying or other use is strictly prohibited. Any opinions expressed in this communication are personal and are not attributable to Gutmark, Radtke & Company. Any communication related to specific engagements is to be read in conjunction with the relevant engagement letter or proposal document as well as our terms and conditions.


----- Original Message -----
From: r-sig-finance-bounces at stat.math.ethz.ch <r-sig-finance-bounces at stat.math.ethz.ch>
To: r-sig-finance at stat.math.ethz.ch <r-sig-finance at stat.math.ethz.ch>
Sent: Mon Dec 28 12:00:01 2009
Subject: R-SIG-Finance Digest, Vol 67, Issue 24

Send R-SIG-Finance mailing list submissions to
	r-sig-finance at stat.math.ethz.ch

To subscribe or unsubscribe via the World Wide Web, visit
	https://stat.ethz.ch/mailman/listinfo/r-sig-finance
or, via email, send a message with subject or body 'help' to
	r-sig-finance-request at stat.math.ethz.ch

You can reach the person managing the list at
	r-sig-finance-owner at stat.math.ethz.ch

When replying, please edit your Subject line so it is more specific
than "Re: Contents of R-SIG-Finance digest..."


Today's Topics:

   1. newbie (Andre de Boer)
   2. Screeningn with IBrokers (Peter Rote)
   3. Re: newbie (Brian G. Peterson)
   4.  Analysis of market impact (Megh)
   5. Re: Analysis of market impact (Mark Breman)
   6. Re: newbie (Hannu Kahra)
   7. Re: Analysis of market impact (Bjorn Hertzberg)
   8. FW: Questions related to R- Credit Risk
      (Lisete Fernandes de Noronha (DGR))


----------------------------------------------------------------------

Message: 1
Date: Sun, 27 Dec 2009 14:35:43 +0100
From: Andre de Boer <aajd at xs4all.nl>
Subject: [R-SIG-Finance] newbie
To: R-SIG-Finance at stat.math.ethz.ch
Message-ID: <21A6F529-2660-4D6D-91D3-0214EF1318B4 at xs4all.nl>
Content-Type: text/plain; charset="iso-8859-1"

Hello,

With quantmod (getSymbols(" ")) I imported some quotes from yahoo.
For instance ING.AS (see below) and AGN.AS.

How can I compute now the correlationcoefficient between ING.AS.Close and AGN.AS.Close?


Thanks for any answer,
Andr? de Boer




-------------- next part --------------
A non-text attachment was scrubbed...
Name: R Console.jpg
Type: image/jpg
Size: 50785 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-sig-finance/attachments/20091227/11a7dadb/attachment-0001.jpg>

------------------------------

Message: 2
Date: Sun, 27 Dec 2009 15:10:40 +0100
From: Peter Rote <r.rote12 at googlemail.com>
Subject: [R-SIG-Finance] Screeningn with IBrokers
To: r-sig-finance at stat.math.ethz.ch
Message-ID:
	<c68c5d80912270610w77f805b4j97978db31e91e61c at mail.gmail.com>
Content-Type: text/plain

Dear All,

I would like to check a large list of stocks Tickers (300) if the open
today is greater then yesterdays high (gap up).
As result i would like to have a variable with symbols which meet the
condition. My Ticker list is a csv file.

my start point is reqMktData(tws, list(twsSTK("AAPL"),twsSTK("SBUX")),
snapshot=TRUE)

1. but how do I put the Tickers in the reqMktData without having to
type all 300 tickers.
2. how do I get the Yesterday High and compare that too today open.

Does anyone have any ideas about that, please?

Thanks for any help,
Sincerely,
Peter

	[[alternative HTML version deleted]]



------------------------------

Message: 3
Date: Sun, 27 Dec 2009 09:36:33 -0600
From: "Brian G. Peterson" <brian at braverock.com>
Subject: Re: [R-SIG-Finance] newbie
To: Andre de Boer <aajd at xs4all.nl>
Cc: R-SIG-Finance at stat.math.ethz.ch
Message-ID: <4B377F01.60207 at braverock.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

Andre de Boer wrote:
> Hello,
> 
> With quantmod (getSymbols(" ")) I imported some quotes from yahoo.
> For instance ING.AS (see below) and AGN.AS.
> 
> How can I compute now the correlation coefficient between ING.AS.Close and AGN.AS.Close?

You can access the columns by name:

ING.AS[,"Close"]
AGN.AS[,"Close"]
cor(ING.AS[,"Close"],AGN.AS[,"Close"])

You might also want to look at http://www.quantmod.com/ for a multitude of 
examples and documentation, and download one of the many R introductory 
tutorials you can find online.

Regards,

   - Brian

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



------------------------------

Message: 4
Date: Sun, 27 Dec 2009 22:41:11 -0800 (PST)
From: Megh <megh700004 at yahoo.com>
Subject: [R-SIG-Finance]  Analysis of market impact
To: r-sig-finance at stat.math.ethz.ch
Message-ID: <1261982471803-989624.post at n4.nabble.com>
Content-Type: text/plain; charset=us-ascii


Hi all, Merry Christmas and happy new year

Here I am into some analysis on, maximum how many lots a market perticipant
can buy/sell in a particular day, on a particular futures contract without
altering the normal market dynamics and in what extend dynamics would be
influenced for some trade exceeding that stipulated amount.

Data I have is, contract-wise high, low, open, close quote as well as traded
volume on daily basis. Can experts here point out how should I do that. Any
references/published papers/books will be highly helpful to me.

Thanks and regards,
-- 
View this message in context: http://n4.nabble.com/Analysis-of-market-impact-tp989624p989624.html
Sent from the Rmetrics mailing list archive at Nabble.com.



------------------------------

Message: 5
Date: Mon, 28 Dec 2009 08:49:01 +0100
From: Mark Breman <breman.mark at gmail.com>
Subject: Re: [R-SIG-Finance] Analysis of market impact
To: Megh <megh700004 at yahoo.com>
Cc: r-sig-finance at stat.math.ethz.ch
Message-ID:
	<5e6a2e670912272349r17bb343fv569148e3edbf6739 at mail.gmail.com>
Content-Type: text/plain

What are "normal market dynamics" in this context?

2009/12/28 Megh <megh700004 at yahoo.com>

>
> Hi all, Merry Christmas and happy new year
>
> Here I am into some analysis on, maximum how many lots a market perticipant
> can buy/sell in a particular day, on a particular futures contract without
> altering the normal market dynamics and in what extend dynamics would be
> influenced for some trade exceeding that stipulated amount.
>
> Data I have is, contract-wise high, low, open, close quote as well as
> traded
> volume on daily basis. Can experts here point out how should I do that. Any
> references/published papers/books will be highly helpful to me.
>
> Thanks and regards,
> --
> View this message in context:
> http://n4.nabble.com/Analysis-of-market-impact-tp989624p989624.html
> Sent from the Rmetrics mailing list archive at Nabble.com.
>
> _______________________________________________
> R-SIG-Finance at stat.math.ethz.ch 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]]



------------------------------

Message: 6
Date: Mon, 28 Dec 2009 09:57:35 +0200
From: Hannu Kahra <hkahra at gmail.com>
Subject: Re: [R-SIG-Finance] newbie
To: Andre de Boer <aajd at xs4all.nl>
Cc: R-SIG-Finance at stat.math.ethz.ch
Message-ID:
	<3d35a2ca0912272357y195a3210xd77147440cdf4f48 at mail.gmail.com>
Content-Type: text/plain

Andre,

if your variables are stock prices your correlation coefficient is close to
one. That is spurious, since prices are nonstationary. You should use
returns instead of prices.

-Hannu

On Sun, Dec 27, 2009 at 3:35 PM, Andre de Boer <aajd at xs4all.nl> wrote:

> Hello,
>
> With quantmod (getSymbols(" ")) I imported some quotes from yahoo.
> For instance ING.AS (see below) and AGN.AS.
>
> How can I compute now the correlationcoefficient between ING.AS.Close and
> AGN.AS.Close?
>
>
> Thanks for any answer,
> André de Boer
>
>
>
>
>
> _______________________________________________
> R-SIG-Finance at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> -- Subscriber-posting only.
> -- If you want to post, subscribe first.
>

	[[alternative HTML version deleted]]



------------------------------

Message: 7
Date: Mon, 28 Dec 2009 09:23:58 +0100
From: Bjorn Hertzberg <bjorn.hertzberg at gmail.com>
Subject: Re: [R-SIG-Finance] Analysis of market impact
To: Megh <megh700004 at yahoo.com>
Cc: "r-sig-finance at stat.math.ethz.ch"
	<r-sig-finance at stat.math.ethz.ch>
Message-ID: <7CDD89F3-DEA1-4638-BEC9-A65968893F5A at gmail.com>
Content-Type: text/plain;	charset=us-ascii;	format=flowed;	delsp=yes

The standard reference for market impact analyses is: http://www.courant.nyu.edu/~almgren/papers/optliq.pdf

/bjorn



28 dec 2009 kl. 07.41 skrev Megh <megh700004 at yahoo.com>:

>
> Hi all, Merry Christmas and happy new year
>
> Here I am into some analysis on, maximum how many lots a market  
> perticipant
> can buy/sell in a particular day, on a particular futures contract  
> without
> altering the normal market dynamics and in what extend dynamics  
> would be
> influenced for some trade exceeding that stipulated amount.
>
> Data I have is, contract-wise high, low, open, close quote as well  
> as traded
> volume on daily basis. Can experts here point out how should I do  
> that. Any
> references/published papers/books will be highly helpful to me.
>
> Thanks and regards,
> -- 
> View this message in context: http://n4.nabble.com/Analysis-of-market-impact-tp989624p989624.html
> Sent from the Rmetrics mailing list archive at Nabble.com.
>
> _______________________________________________
> R-SIG-Finance at stat.math.ethz.ch 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.



------------------------------

Message: 8
Date: Mon, 28 Dec 2009 09:56:39 +0000
From: "Lisete Fernandes de Noronha (DGR)"
	<lisete.fernandes.noronha at caixaseguros.pt>
Subject: [R-SIG-Finance] FW: Questions related to R- Credit Risk
To: "'r-sig-finance at stat.math.ethz.ch'"
	<r-sig-finance at stat.math.ethz.ch>
Message-ID:
	<AE5E550698A603449F82135F81F0DA3418E15B2BF6 at VPF6001EXC012.fidelidademundial.com>
	
Content-Type: text/plain; charset="us-ascii"


I am a new user of R software, and at the moment I am interested in applying "R" to calculate Credit Risk measures.

I have already been in contact with Andreas Wittmann (responsible for CreditMetrics package). Nevertheless, there are some doubts that I have which Andreas could not help me. 

Is it possible to get the answers for my questions?

1. Which package calculates lgd (loss given default)?

 2. Besides CreditMetrics package, which packages are related with 
 Credit Risk in order to calculate credit risk measures, as:

 -          Loss Distribution;
 -          VAR;
 -          Unexpected Losses:
 -          Risk Contribution


Thank you
Best regards,
Lisete Noronha


-----Original Message-----
From: Andreas Wittmann [mailto:andreas_wittmann at gmx.de] 
Sent: sexta-feira, 25 de Dezembro de 2009 8:24
To: Lisete Fernandes de Noronha (DGR)
Subject: Re: Questions related to R- Credit Risk

Hi Lisete,

sorry, but spontaneously i have no answers for your questions. please 
search the following mailing lists and if your questions cannot be 
answered, ask the questions there again.

https://stat.ethz.ch/mailman/listinfo/r-help
https://stat.ethz.ch/mailman/listinfo/r-sig-finance

best regards and merry christmans

Andreas




Lisete Fernandes de Noronha (DGR) wrote:
>
> Thanks for your help.
>
> Sorry, but I have more questions for you.
>
> 1. Can you tell me which package calculates lgd?
>
> 2. Besides CreditMetrics package, which packages are related with 
> Credit Risk in order to calculate credit risk measures, as:
>
> -          Loss Distribution;

> -          VAR;

> -          Unexpected Losses:

> -          Risk Contribution
>
> Best Regards,
>
> Lisete
>
>  
>
>  
>
> ------------------------------------------------------------------------
>
> *From:* Andreas Wittmann [mailto:andreas_wittmann at gmx.de]
> *Sent:* segunda-feira, 21 de Dezembro de 2009 18:00
> *To:* Lisete Fernandes de Noronha (DGR)
> *Subject:* Re: Questions related to R- Credit Risk
>
>  
>
> Dear Lisete,
>
> thank you for using the CreditMetrics package.
>
>    1. the pd is the probability of default, as you can see in the
>       migration matrix this is the last column without the last row.
>    2. the lgd is not calculated in this package, it is only an input
>       parameter and actually it is only possibly to use the same lgd
>       for each rating.
>
>
> hope this helps.
>
> best regards
>
> Andreas
>
>
>



------------------------------

_______________________________________________
R-SIG-Finance mailing list
R-SIG-Finance at stat.math.ethz.ch
https://stat.ethz.ch/mailman/listinfo/r-sig-finance


End of R-SIG-Finance Digest, Vol 67, Issue 24
*********************************************



More information about the R-SIG-Finance mailing list