From 73b15d1da94521dc838ec67e9044bfb9a359f138 Mon Sep 17 00:00:00 2001 From: zarzuelo Date: Wed, 23 Jan 2013 10:09:55 +0000 Subject: [PATCH] 2013-01-23 Sergio Martin * util/plugin/EU_10yrspread.pl: Updated the european countries 10 years spread plugin to new bloomberg website git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7519 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_server/ChangeLog | 5 +++++ pandora_server/util/plugin/EU_10yrspread.pl | 22 +++++++++++++-------- 2 files changed, 19 insertions(+), 8 deletions(-) diff --git a/pandora_server/ChangeLog b/pandora_server/ChangeLog index cd073f09b1..a53cbcee5b 100644 --- a/pandora_server/ChangeLog +++ b/pandora_server/ChangeLog @@ -1,3 +1,8 @@ +2013-01-23 Sergio Martin + + * util/plugin/EU_10yrspread.pl: Updated the european countries + 10 years spread plugin to new bloomberg website + 2013-01-22 Juan Manuel Ramon * util/pandora_xml_stress.conf diff --git a/pandora_server/util/plugin/EU_10yrspread.pl b/pandora_server/util/plugin/EU_10yrspread.pl index a8df8d30c4..a603edd655 100755 --- a/pandora_server/util/plugin/EU_10yrspread.pl +++ b/pandora_server/util/plugin/EU_10yrspread.pl @@ -6,6 +6,7 @@ use warnings; use LWP::Simple; use POSIX qw(strftime); + sub main { my $agent_name = "EU_10yrspread"; @@ -14,22 +15,27 @@ sub main my $utimestamp = time (); my $timestamp = strftime ("%Y-%m-%d %H:%M:%S", localtime()); + my $germany_spread = get_10yspread('GDBR10:IND')*100; + my %codes; - $codes{'Spain'} = '.SPAINGER10:IND'; - $codes{'Greece'} = '.GRGER10:IND'; - $codes{'Italy'} = '.ITAGER10:IND'; - $codes{'Portugal'} = '.PORGER10:IND'; - $codes{'Ireland'} = '.IRGERSP:IND'; - $codes{'France'} = '.FRAGER10:IND'; - $codes{'Belgium'} = '.BELGER10:IND'; + $codes{'United Kingdom'} = 'GUKG10:IND'; + $codes{'Spain'} = 'GSPG10YR:IND'; + $codes{'Greece'} = 'GGGB10YR:IND'; + $codes{'Italy'} = 'GBTPGR10:IND'; + $codes{'Portugal'} = 'GSPT10YR:IND'; + #$codes{'Ireland'} = '.IRGERSP:IND'; + $codes{'France'} = 'GFRN10:IND'; + $codes{'Netherlands'} = 'GNTH10YR:IND'; + $codes{'Switzerland'} = 'GSWISS10:IND'; + #$codes{'Belgium'} = '.BELGER10:IND'; my $xml_output = ""; $xml_output .= ""; foreach my $k (keys(%codes)) { my $code = $codes{$k}; - my $spread = get_10yspread($code)*100; + my $spread = get_10yspread($code)*100-$germany_spread; $xml_output .=" "; $xml_output .=" ";