US Fed Presidents comments blamed for sell-off in global equities and risk currencies, subsequent rhetoric calms nerves; weak US data behind USD decline

By Ian Dobbs*:

Financial markets got their largest fright since June’s UK Brexit vote on Friday after comments from US Fed Presidents Rosengren and Kaplan. The comments pointed to the increased chance of low interest rates overheating the US economy and the strengthening case (in past months) for a rate hike. The comments saw global equities and risk currencies fall heavily as the Fed fund futures jumped 6% to place a 24% chance on a Fed move next week. The 39% jump in the VIX volatility index on the day highlights the recent complacency that the financial markets have had given the prospect of continued low global interest rates and further central bank stimulus.  Comments from Fed officials yesterday have helped calm the markets in recent trade after they spoke of a lack in urgency in the need to raise US rates, this saw the markets eliminate all of Fridays September Fed funds move. Expect a quieter week this week until Thursday (noting the window for Fed member comments is now closed) when the key US data wrap starts. Expect no change from the BoE when they meet earlier in day given the recent run of stronger than expected key UK data.

Major Announcements last week:

  • Australian Q2 Company Profits, 6.9% q/q vs -4.4% prior.
  • UK Markit Services PMI, 52.9 vs. 50.0 exp. (Aug.)
  • EU Markit Services PMI, 52.8 vs. 53.1 exp. (Aug.)
  • Australian Cash Rate, on hold at 1.5% as exp.
  • NZ GDT Dairy Price Index, +7.7% vs. +12.7% prior.
  • US ISM Non-Manufacturing PMI, 51.4 vs. 55.0 exp. (Aug.)
  • Australian Q2 GDP, 0.5% q/q vs. 0.6% exp.
  • UK Manufacturing Production, 0.8% y/y vs. 1.7% exp. (Jul.)
  • Canadian Cash Rate, on hold at 0.5% as exp.
  • Japanese Q2 GDP, 0.2% q/q vs. 0.0% exp.
  • Australian Trade Balance, -2,410M vs. -2,750M exp. (Jul.)
  • Canadian Net Change in Employment, 26.2k vs. 15.0k exp. (Aug.)

NZD/USD

The New Zealand dollar has fallen heavily against the greenback since our report last week. This has been on the back of comments from US Fed officials on Friday which raised the odds on pricing for a US rate hike later this month. The comments drove the USD higher and saw the VIX index of volatility spike 39% as US equities underwent their largest correction since the British Brexit vote. The comments took the gloss of what had a been a good week for the kiwi which saw it reach highs around .7485 against the USD. Focus for this week will be on further US events and Thursday’s NZ GDP data. Look for support under .7300 to hold the key to sustained upside for now.

DIRECT FX Current level Support Resistance Last wk range
NZD / USD 0.7348 0.7290 0.7490 0.7291 – 0.7485

NZD/AUD (AUD/NZD)

The New Zealand dollar is largely unchanged against the Australian dollar since our last report. The lack of overall movement reflects the lack of new critical incoming data in the interim which is again the case this week until Thursday. That’s when we get indicators on GDP (NZ) and employment (Australia). For now the momentum remains strong for the NZD, with first resistance noted at recent highs (up rising uptrend) around the .9740/50 area (1.0267/1.0256 support). Look for the respective data to drive the next move although for now current levels to buy the AUD look appealing.

DIRECT FX Current level Support Resistance Last wk range
NZD / AUD 0.9731 0.9640 0.9750 0.9584 – 0.9740
AUD / NZD 1.0276 1.0256 1.0373 1.0267 – 1.0435

NZD/GBP (GBP/NZD)

The New Zealand dollar has eased against the UK pound since our report last week. The move comes in the aftermath of Friday’s comments from US Fed officials which raised the prospects for a Fed hike later this month and saw investors desert equities and the risk currencies (like the NZD) in favour of the greenback. The comments have seen the GBP outperform the NZD in the interim, although some recovery has been seen in recent hours in the wake of other Fed official commentary. Look for a busy week this week starting with numbers on UK inflation today. Expect further reaction to UK employment numbers tomorrow and NZ GDP/ the BoE on Thursday.

DIRECT FX Current level Support Resistance Last wk range
NZD / GBP 0.5515 0.5450 0.5600 0.5482 – 0.5604
GBP / NZD 1.8131 1.7857 1.8349 1.7843 – 1.8242

 NZD/CAD

The New Zealand dollar is largely unchanged against the Canadian dollar since our report last week. Some volatility has been noted in the interim after the comments from Fed officials on Friday which raised the probability for a US rate hike later this month (although the lows have been contained by .9510). The comments saw investors ditch equities and risk currencies (NZD-) although the CAD was also effected via the lurch lower in the oil price. This week looks set to be quiet outside of the NZ GDP data on Thursday although eyes will again be on events later in the week in the US (US data).

DIRECT FX Current level Support Resistance Last wk range
NZD / CAD 0.9587 0.9510 0.9650 0.9441 – 0.9649

NZD/EURO (EURO/NZD)

The New Zealand dollar has fallen against the Euro since our report last week. The move reflects the outperformance of the EUR in the wake of those Fed official comments on Friday. These saw the market lift the odds on pricing of a US rate hike later this month. The comments drove a large correction in global equities during the day and saw investors flee the risk currencies (like the NZD). Look for the risk theme to be at the forefront of investor’s minds again this week given the surge in volatility of recent days. On the data front expect the NZ GDP numbers on Thursday to have the greatest chance of impact. We favour the NZD to again firm as investors begin to embrace risk and assess that little has changed in the US.

DIRECT FX Current level Support Resistance Last wk range
NZD / EUR 0.6544 0.6480 0.6650 0.6483 – 0.6653
EUR / NZD 1.5282 1.5038 1.5432 1.5031 – 1.5424

NZD/YEN

The New Zealand dollar has fallen heavily against the Japanese Yen since our report last week. The move was unforeseen and came on the back of the large surge in volatility and move out of global equities and riskier currencies after the comments from US Fed officials on Friday. The comments lifted expectations for a Fed rate hike later this month, although an opposing interpretation on the need for a US rate move was offered by other Fed officials overnight. Look for the risk (NZD) and safe haven (JPY) theme to again dictate this week whilst on the data front NZ GDP on Thursday has the most chance of inciting further volatility.

DIRECT FX Current level Support Resistance Last wk range
NZD / YEN 74.60 74.30 76.10 74.33 – 76.00

AUD/USD

The Australian dollar has fallen heavily against the greenback since our report last week. The AUD eventually topped around the .7735 during the week, although fell quickly on Friday after the comments from Fed officials saw investors chase the USD and desert global equities and risk currencies. Lows have been limited to ahead of support at .7490 for now after the AUD benefitted from a rebound in the markets overnight (again Fed official comment inspired). Look to the Australian employment numbers on Thursday for fresh direction and key US data which also starts on Thursday. We favour the upside while .7490 remains intact.

DIRECT FX Current level Support Resistance Last wk range
AUD / USD 0.7546 0.7490 0.7735 0.7494 – 0.7732

AUD/GBP (GBP/AUD) 

The Australian dollar has fallen in trade against the UK pound since our report last week. The move reflects the reduction in the appetite for the risk currencies and relative outperformance of the GBP in the wake of hawkish comments from Fed officials on Friday (over US rates), which saw global equities plummet and investors chase the greenback. This week looks likely to again be a busy one for this cross with indicators on UK inflation and employment due from both countries. Data from the UK retail sector is due on Thursday, although will be overshadowed by the BoE interest rate decision a few hours later. We lack a view given the busy (uncertain) schedule, but do point to .5625 (1.7778) as looking critical to further AUD downside.

DIRECT FX Current level Support Resistance Last wk range
AUD / GBP 0.5664 0.5625 0.5790 0.5648 – 0.5790
GBP / AUD 1.7654 1.7271 1.7778 1.7272 – 1.7705

AUD/EURO (EURO/AUD)

The Australian dollar has fallen heavily against the Euro since our report last week. The moves reflects the more hawkish than expected commentary coming out of Thursday’s ECB press conference which was exacerbated by the flight out of risk currencies on Friday after the hawkish comments from Fed officials saw investors sell global equities and buy the USD. In focus this week is the ZEW economic sentiment survey (EUR today) and the Australian employment data on Thursday. Once again the performance of international markets should also be monitored (AUD). We marginally favour selling AUD rallies for now, although first resistance is distant.

DIRECT FX Current level Support Resistance Last wk range
AUD / EUR 0.6721 0.6665 0.6855 0.6670 – 0.6858
EUR / AUD 1.4879 1.4588 1.5004 1.4581 – 1.4992

AUD/YEN

The Australian dollar has fallen sharply against the Japanese Yen since our report last week. The move was unexpected and comes on the back of a severe financial market reaction to the hawkish comments of Fed officials on Friday, which saw the market raise the pricing for a US rate hike later this month. The comments saw investor’s desert equities and the risk currencies in favour of the USD and safe haven currencies like the Yen. Look to the Australian employment data (Thursday) and US data later in the week for direction. A watch should also be kept on markets, although there will be no further commentary from Fed officials now prior to next week’s monetary policy meeting.

DIRECT FX Current level Support Resistance Last wk range
AUD / YEN 76.58 76.10 79.20 76.43 – 79.12

AUD/CAD

The Australian dollar has eased against the Canadian dollar since our report last week. The move comes on the back of a relatively weaker AUD after the hawkish comments from Fed officials on Friday saw the market re-price the odds (higher initially) of a Fed rate move next week. This week looks set to be quiet outside of the Australian employment data release on Thursday given the empty key Canadian data calendar and closed window for Fed official commentary. This has us favouring marginal upside that sees ranges within last week’s bounds (unless the Australian data materially surprises).

DIRECT FX Current level Support Resistance Last wk range
AUD / CAD 0.9844 0.9720 0.9950 0.9819 – 0.9949

————————————————————————————————————-

To subscribe to our free daily Currency Rate Sheet and News email, enter your email address here.

Email:  

————————————————————————————————————————–

Market commentary:

Financial markets got their largest fright since June’s UK Brexit vote on Friday after comments from US Fed Presidents Rosengren and Kaplan. The comments pointed to the increased chance of low interest rates overheating the US economy and the strengthening case (in past months) for a rate hike. The comments saw global equities and risk currencies fall heavily as the Fed fund futures jumped 6% to place a 24% chance on a Fed move next week. The 39% jump in the VIX volatility index on the day highlights the recent complacency that the financial markets have had given the prospect of continued low global interest rates and further central bank stimulus.  Comments from Fed officials yesterday have helped calm the markets in recent trade after they spoke of a lack in urgency in the need to raise US rates, this saw the markets eliminate all of Fridays September Fed funds move. Expect a quieter week this week until Thursday (noting the window for Fed member comments is now closed) when the key US data wrap starts. Expect no change from the BoE when they meet earlier in day given the recent run of stronger than expected key UK data.

Australia

Volatility in the markets has jumped since our report last week on the back of comments from US Fed officials. These initially drove the risk currencies and global equities lower on Friday before they underwent a rebound in trade overnight. This rebound came on the back of further comments which spoke of the need for caution and the lack of urgency in the need for moving US rates. Australian data last week included numbers on the June quarter GDP which showed solid growth of 3.3% year-on-year, although the quarterly number was well down on the previous period and was bolstered by heavy public spending in the defence sector. The RBA was seen remaining on hold at its latest cash rate review. This decision was as expected after departing Governor Stevens judged that present policy would help achieve the inflation target over time. However,  weak underlying global inflation pressures and record low wages growth domestically have combined with a high AUD to lend weight to the argument for a further cut. Other data included housing finance which fell in July and the AIG services and constructions PMIs which like the manufacturing PMI earlier fell in August. ANZ job ads were strong and the July trade deficit improved sharply from the month prior, although was helped by the volatile gold export component. Dominating focus for this week will be the latest read on employment on Thursday.

New Zealand

Official Fed commentary has dominated market sentiment since our last commentary. Friday’s comments from the Fed’s Rosengren and Kaplan drove a heavy sell-off in US equities and a 39% spike in the VIX index of volatility. This came after they spoke of the low interest rates increasing the chance of overheating the US economy and of the strengthening case for a US rate hike. The comments saw risk taken of the table and the NZD fall over 2.5% (against the greenback) from its recent highs at one stage overnight. However, comments from other Fed members reversed the direction of the markets after they spoke of the caution and little need for urgency around raising US rates. Last week was a quiet one locally for key data releases with the main contributor to market sentiment being the weaker US data and the further lift in the latest GDT dairy auction. Other releases included the June quarter manufacturing sales numbers which rose on the back of solid primary industry gains and ANZ commodity prices which reflected the recent strong rise in the price of dairy products. Local focus this week includes numbers on the June quarter current account (tomorrow) and GDP (Thursday).

United States

Trade in the greenback last week was dominated by two key events. The first was the weak ISM Non-manufacturing survey earlier in the week which saw the USD decline. The second was comments of Boston Fed President Rosengren and Dallas Fed President Kaplan on Friday whom both pointed to the case for a rate hike later this month. The comments saw the USD rally sharply and US equities undergo their strongest sell-off since the UK Brexit vote. However, much of the losses have been reversed in overnight trade on the back of further Fed official comments which pointed to no urgent need in raising the US benchmark rate. Other data last week included indicators on the labour market which remained strong as the rate of job offerings, hiring and people quitting remained at high levels, and jobless claims which remained very low. The Fed’s Beige book spoke of modest growth and a tight job market which showed little sign of overall wage pressure. This week is set to start quietly, although will heat up on Thursday when we get various indicators which include those from the manufacturing and retail sectors and numbers on inflation on Friday (amongst others).

Europe

Last week in Europe was dominated by Thursday’s ECB interest rate decision which saw the ECB leave monetary policy unchanged and economic forecasts which lacked any significant change. President Draghi’s comments that an extension to the current quantitative (QE) easing program was not discussed was interpreted as hawkish and saw the Euro rally during the announcement. An extension to the program (beyond the current March 2017 expiry) at the December meeting looks likely however. This is because of the lack of inflationary pressures and inflation rate which remains well below target, especially given that the ECB’s own economic forecasts assume a continuation of the current QE program. Data released during the week included EU services and composite PMI numbers which fell short of expectations and German industrial production and factory order data which were both weaker than expected. Retail sales across the EU lifted by more than expected in July and were up 2.9% year-on-year. Interest this week comes in the form of German inflation numbers today (EU inflation on Thursday) and the ZEW survey of economic sentiment. EU industrial production will provide limited interest tomorrow.

United Kingdom

Last week was a mixed one for the GBP which saw the early week gains relinquished by the week’s end. The weakness came after the BoE inflation report and comments from US Fed officials on Friday. The comments which upped the ante on a US Fed rate hike later this month incited a rally in the greenback and a sharp sell-off in global equities. Data released in the UK last week included the latest services PMI indicator which jumped sharply from the month prior, and numbers from the manufacturing sector which disappointed after they fell by the largest amount in a year. Industrial production data was better than expected, although reflected strength from the relatively (Brexit) immune oil and gas sector. Halifax house prices fell 0.2% in August, only half the decline expected, although the three monthly rise was the slowest quarterly growth rate since Dec 2014. Trade data for July showed an improving UK deficit which was helped by a weaker GBP and improving level of exports. This week is set to be busy starting with inflation and producer price numbers today and employment tomorrow. Thursday’s key central bank decision should see the BoE remain on hold in light of the recent tone of better than expected key data.

Japan

Volatility in the financial markets and safe haven flow has dominated trade in the Yen since our last report. The jump in volatility came on Friday after hawkish comments from Fed members spooked the market over the likelihood of a Fed rate rise later this month. The comments saw US equities fall heavily on the day and the Yen rise on the back of increased ‘safe haven’ demand. This theme has been lacking in the market in recent weeks as global equities continued to ride the wave of central bank stimulus and cheap credit. Comments from other Fed members overnight have helped the markets regain a stronger footing after they suggested there was no urgency to raise the benchmark US rate. Local data released last week included upwards revisions to the June quarter GDP growth numbers and stronger than expected wages growth. Current account data was slightly weaker than expected, although the leading index of the economy rose from the period prior. Machinery orders for July released yesterday was much better than expected and the BSI index of large manufacturing sentiment conditions released this morning showed a solid bounce in Q3.

Canada

Interest in Canada last week was dominated by the BoC interest rate decision and August employment data. The former pressured the CAD on the back of comments over the risk of weak inflation, lower than expected growth and concern over the household exposure to the overheated property market. Rates were left on hold at 0.5% as expected. Employment data released on Friday was better than expected with the creation of 52k full time jobs during the month helping offset July’s particularly weak report. More people entering the workforce saw the unemployment rate inch higher to 7%. Other data of interest included the Ivey PMI which was weaker than expectations, and building permits/housing starts numbers which both also failed to meet their consensus. New house prices which rose 0.4% m/m in July was double that expected. This week is particularly quiet in Canada so look to the USD and oil pricing for direction, particularly in light of the recent Fed member comments which has put additional focus on US rates, the USD and USD linked commodity pricing.

Daily exchange rates

<!–

var root_url = "http://www.interest.co.nz/charts-csv/";
var tabs_count="7";
var csvfiles_loc= ["/charts-csv/chart_data/exchangerates/daily-usd.csv"," /charts-csv/chart_data/exchangerates/daily-aud.csv"," /charts-csv/chart_data/exchangerates/daily-twi.csv"," /charts-csv/chart_data/exchangerates/daily-yen.csv"," /charts-csv/chart_data/exchangerates/daily-yuan.csv"," /charts-csv/chart_data/exchangerates/daily-eur.csv"," /charts-csv/chart_data/exchangerates/daily-gbp.csv"];
var chart_title_arr= ["US dollar","Australian dollar","Trade weighted index","Japanese Yen","Chinese Yuan","Euro","British pound"];
var chart_subtitles_arr= ["Daily benchmark rate","Daily benchmark rate","Daily benchmark rate","Daily benchmark rate","Daily benchmark rate","Daily benchmark rate","Daily benchmark rate"];
var tab_titles_arr= ["US$","AU$","TWI","u00a5en","u00a5uan","u20acuro","GBP"];
var source_arr= ["RBNZ","RBNZ","RBNZ","RBNZ","RBNZ","RBNZ","RBNZ"];
var source_hyperlink_arr= ["8"];
var tabswidth="8";
var decimal_arr= ["4","4","4","2","2","4","4"];

// variable declaration
var xpad;
var padding_value=0;
var range_selector=0
var loc;
var updt;
var val_num;
var vi=0;
var max_val;
var x;

var finalAr = new Array();
for (var i = 0; i <= tabs_count; i++) {
finalAr[i] = new Array();
}
var flagAr = new Array();
for (var i = 0; i <= tabs_count; i++) {
flagAr[i] =[];
}
var yaxisAr = new Array();
for (var i = 0; i 536)
{
var b = arr.length – 536; // to get last 36 points
}
else if (arr.length < 536)
{
var b = 537 – arr.length;
}
else if(arr.length == 536)
{
var b=2;
}

// to generate the format for date representation in x axis

var timestamweek = 604800000;
var timestamday = 86400000;
var timestammonth30 = 2592000000;
var timestammonth31 = 2678400000;
var timestamyear = 31536000000;
var timestamquarterly = 7776000000;

for (var u=0;u<2;u++) {
arr[u] = parseLineCSV(arr[u]);
fomat= String(arr[u][0]);
var k=0;

do {
k++;
} while(fomat.charAt(k)!="-")
var k1 =k;

do {
k++;
} while(fomat.charAt(k)!="-")
var k2=k;

do {
k++;
} while(k<fomat.length)
var k3=k;

var dd= fomat.substring(0,k1);
var mm = fomat.substring(k1+1,k2);
var yy = "20"+fomat.substring(k2+1,k3+1);
var yy1=fomat.substring(k2+1,k3+1);

// conversion of months into numerical form

//+++++++++++++++++++++++++++++++++++
if (mm == "Jan")
{
mm= "01";
}
else if (mm == "Feb")
{
mm= "02";
}

else if (mm == "Mar")
{
mm= "03";
}

else if (mm == "Apr")
{
mm= "04";
}

else if (mm == "May")
{
mm= "05";
}

else if (mm == "Jun")
{
mm= "06";
}

else if (mm == "Jul")
{
mm= "07";
}

else if (mm == " Aug")
{
mm= "08";
}

else if (mm == "Sep")
{
mm= "09";
}

else if (mm == "Oct")
{
mm= "10";
}

else if (mm == "Nov")
{
mm= "11";
}

else if (mm == "Dec")
{
mm= "12";
}

// +++++++++++++++++++++++++++++++++++++++++++++++++++++++

var date2 = mm+"/"+dd+"/"+yy;

if (u==0)
{
var timestam1 = Date.parse(date2);
}
else if(u==1)
{
var timestam2 = Date.parse(date2);
}
}
var timestamvar = (timestam2- timestam1);
var flagAR_count=0;
for (var i=2;i<arr.length;i++) {
flagAR_count++;
var tempAr = new Array();
var tempAr1 = new Array();
arr[i] = parseLineCSV(arr[i]);
if (arr[i]!='')
{

fomat= String(arr[i][0]);
replic=String(arr[i][0]);
var k=0;

do {
k++;
} while(fomat.charAt(k)!="-")
var k1 =k;

do {
k++;
} while(fomat.charAt(k)!="-")
var k2=k;

do {
k++;
} while(k<fomat.length)
var k3=k;

var dd= fomat.substring(0,k1);
var mm = fomat.substring(k1+1,k2);
var current_year=""+new Date().getFullYear();
var c_year=Number(current_year.substring(2,4));
var c_data=Number(''+fomat.substring(k2+1,k3+1));
if(c_data c_year)
{
var yy = “19”+fomat.substring(k2+1,k3+1);
}
else if(c_data == c_year)
{
var yy = “20”+fomat.substring(k2+1,k3+1);
}
// conversion of months into numerical form

//+++++++++++++++++++++++++++++++++++
if (mm == “Jan”)
{
mm= “01”;
}
else if (mm == “Feb”)
{
mm= “02”;
}

else if (mm == “Mar”)
{
mm= “03”;
}

else if (mm == “Apr”)
{
mm= “04”;
}

else if (mm == “May”)
{
mm= “05”;
}

else if (mm == “Jun”)
{
mm= “06”;
}

else if (mm == “Jul”)
{
mm= “07”;
}

else if (mm == “Aug”)
{
mm= “08”;
}

else if (mm == “Sep”)
{
mm= “09”;
}

else if (mm == “Oct”)
{
mm= “10”;
}

else if (mm == “Nov”)
{
mm= “11”;
}

else if (mm == “Dec”)
{
mm= “12”;
}
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++

var date = mm+”/”+dd+”/”+yy;

var timestam_1 = Date.parse(date);
var timestam= timestam_1+86400000; //86400000 added to get correct timezone output from Date.parse
var time4 = new Date(timestam);
var Weeko = time4.getDay();
var dd2 = time4.getDate();
var mm2 = time4.getMonth();
var flag_y=arr[i][1];
var ahref_title=”Click here for full story”;
if(arr[i][2]) {
var url=arr[i][2];
var flag_date='{“x”:’+timestam+’, “title”:”  “,”text”:”Click here for Story!”}’;

flagAr[csvgen_counter].push(flag_date);
}
var yy2 = time4.getFullYear();
var yy3 = yy2+””;
var yy4= yy3.substring(2,4);
//++++++++++++++++++++++++this for days conversion++++++++++++++++++++++++++++
if (Weeko==1)
{
Weeko = “Mon”;
}

else if (Weeko==2)
{
Weeko = “Tue”;
}

else if (Weeko==3)
{
Weeko = “Wed”;
}

else if (Weeko==4)
{
Weeko = “Thu”;
}

else if (Weeko==5)
{
Weeko = “Fri”;
}

else if (Weeko==6)
{
Weeko = “Sat”;
}

else if (Weeko==0)
{
Weeko = “Sun”;
}

//+++++++++++++++++++++++this is for month conversion+++++

if (mm2==0)
{
mm2 = “Jan”;
}

else if (mm2==1)
{
mm2 = “Feb”;
}

else if (mm2==2)
{
mm2 = “Mar”;
}

else if (mm2==3)
{
mm2 = “Apr”;
}

else if (mm2==4)
{
mm2 = “May”;
}

else if (mm2==5)
{
mm2 = “Jun”;
}

else if (mm2==6)
{
mm2 = “Jul”;
}

else if (mm2==7)
{
mm2 = “Aug”;
}

else if (mm2==8)
{
mm2 = “Sep”;
}

else if (mm2==9)
{
mm2 = “Oct”;
}

else if (mm2==10)
{
mm2 = “Nov”;
}

else if (mm2==11)
{
mm2 = “Dec”;
}
//++++++++++++++++++++++++++++++++++++++++

//weekly
if ( timestamvar == timestamweek)
{
fomat2=dd2+”-“+mm2+”-“+yy4;
padding_value=timestamweek;
range_selector=2;
}

// Daily
else if ( timestamvar = timestamyear)
{
fomat2=mm2+”-“+yy4;
padding_value=timestamyear;
range_selector=3;
}

//monthly
else if ((timestamvar <= timestammonth30)&&(timestamvar = timestamquarterly)
{
fomat2=mm2+”-“+yy4;
padding_value=timestamquarterly;
range_selector=3;
}

else
{
fomat2=dd2+”-“+mm2+”-“+yy4;
padding_value=timestamday;
range_selector=3;
}

arr[i][0]= fomat2;
var decpad;
decpad = parseFloat(arr[i][1]);
arr[i][1] = decpad;

if(i==(arr.length-1))
{

// Functionality to get the last value

var xvalu=dd2+”-“+mm2+”-“+yy4;
var yvalu= String(arr[i][1]);
var xyvalu=”Latest value at “+xvalu+” is “+yvalu;
updt=”Updated on “+xvalu;
}

tempAr.push(timestam);
if(!arr[i][1])
{
arr[i][1]=null;
}
yaxisAr[csvgen_counter].push(arr[i][1]);
// tempAr1.push(timestam);
// tempAr2.push(tempAr1);
tempAr.push(arr[i][1]);
last_val=timestam;
finalAr[csvgen_counter].push(tempAr);
}
xpad=last_val+padding_value; //*****************to end up graph early//////
if(arr[i]== “”)
{
vi=arr.length-i;
arr.length=arr.length-vi;
i=arr.length-1;
fomat = replic;

var k=0;

do {
k++;
} while(fomat.charAt(k)!=”-“)
var k1 =k;

do {
k++;
} while(fomat.charAt(k)!=”-“)
var k2=k;

do {
k++;
} while(k<fomat.length)
var k3=k;

var dd= fomat.substring(0,k1);
var mm = fomat.substring(k1+1,k2);
var yy = "20"+fomat.substring(k2+1,k3+1);

// conversion of months into numerical form

//+++++++++++++++++++++++++++++++++++
if (mm == "Jan")
{
mm= "01";
}
else if (mm == "Feb")
{
mm= "02";
}

else if (mm == "Mar")
{
mm= "03";
}

else if (mm == "Apr")
{
mm= "04";
}

else if (mm == "May")
{
mm= "05";
}

else if (mm == "Jun")
{
mm= "06";
}

else if (mm == "Jul")
{
mm= "07";
}

else if (mm == "Aug")
{
mm= "08";
}

else if (mm == "Sep")
{
mm= "09";
}

else if (mm == "Oct")
{
mm= "10";
}

else if (mm == "Nov")
{
mm= "11";
}

else if (mm == "Dec")
{
mm= "12";
}
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++

var date = mm+"/"+dd+"/"+yy;
//here flagAr may be
var timestam = Date.parse(date);
var time4 = new Date(timestam);
var Weeko = time4.getDay();
var dd2 = time4.getDate();
var mm2 = time4.getMonth();

var yy2 = time4.getFullYear();
var yy3 = yy2+"";
var yy4= yy3.substring(2,4);
//++++++++++++++++++++++++this for days conversion++++++++++++++++++++++++++++
if (Weeko==1)
{
Weeko = "Mon";
}

else if (Weeko==2)
{
Weeko = "Tue";
}

else if (Weeko==3)
{
Weeko = "Wed";
}

else if (Weeko==4)
{
Weeko = "Thu";
}

else if (Weeko==5)
{
Weeko = "Fri";
}

else if (Weeko==6)
{
Weeko = "Sat";
}

else if (Weeko==0)
{
Weeko = "Sun";
}

//+++++++++++++++++++++++this is for month conversion+++++

if (mm2==0)
{
mm2 = "Jan";
}

else if (mm2==1)
{
mm2 = "Feb";
}

else if (mm2==2)
{
mm2 = "Mar";
}

else if (mm2==3)
{
mm2 = "Apr";
}

else if (mm2==4)
{
mm2 = "May";
}

else if (mm2==5)
{
mm2 = "Jun";
}

else if (mm2==6)
{
mm2 = "Jul";
}

else if (mm2==7)
{
mm2 = "Aug";
}

else if (mm2==8)
{
mm2 = "Sep";
}

else if (mm2==9)
{
mm2 = "Oct";
}

else if (mm2==10)
{
mm2 = "Nov";
}

else if (mm2==11)
{
mm2 = "Dec";
}
//++++++++++++++++++++++++++++++++++++++++

//weekly
if ( timestamvar == timestamweek)
{
fomat2=dd2+"-"+mm2+"-"+yy4;
}

// Daily
else if ( timestamvar = timestamyear)
{
fomat2=mm2+”-“+yy4;
}

//monthly
else if ((timestamvar <= timestammonth30)&&(timestamvar = timestamquarterly)
{
fomat2=mm2+”-“+yy4;
}

arr[i][0]= fomat2;
var decpad;

decpad = parseFloat(arr[i][1]);
//arr[i][1] = roundVal(decpad);
arr[i][1] = decpad;
if(i==(arr.length-1))
{

var xvalu=dd2+”-“+mm2+”-“+yy4;
var yvalu= String(arr[i][1]);
var xyvalu=”Latest value at “+xvalu+” is “+yvalu;
updt=”Updated on “+xvalu;
}
}

}
}

//other required functions

//chart configuration starts here

function getXMLHttpRequest(file) {

//var arrSignatures = [“MSXML2.XMLHTTP.5.0”, “MSXML2.XMLHTTP.4.0″,
//”MSXML2.XMLHTTP.3.0”, “MSXML2.XMLHTTP”,
//”Microsoft.XMLHTTP”];

//for (var i=0; i < arrSignatures.length; i++) {

try
{
var xmlhttp = new window.XMLHttpRequest();
xmlhttp.open("POST",file,false);
return xmlhttp;
}
catch(e)
{
error=e.message;
}

//}
throw new Error("MSXML is not installed on your system.");
}

function readCSV(locfile) {
// load a whole csv file, and then split it line by line
var req = new getXMLHttpRequest(locfile);
//req.open("POST",locfile,false);
req.send("");
return req.responseText.split(/n/g);
}

function parseLineCSV(lineCSV) {
// parse csv line by line into array
var CSV = new Array();

lineCSV = lineCSV.replace(/,/g," ,");

lineCSV = lineCSV.split(/,/g);

// This is continuing of 'split' issue in IE
// remove all trailing space in each field
for (var i=0;i<lineCSV.length;i++) {
lineCSV[i] = lineCSV[i].replace(/s*$/g,"");
}

lineCSV[lineCSV.length-1]=lineCSV[lineCSV.length-1].replace(/^s*|s*$/g,"");
var fstart = -1;

for (var i=0;i=0) {
for (var j=fstart+1;j<=i;j++) {
lineCSV[fstart]=lineCSV[fstart]+","+lineCSV[j];
lineCSV[j]="-DELETED-";

}
fstart=-1;
}
}
fstart = (lineCSV[i].match(/^"/)) ? i : fstart;
}

var j=0;

for (var i=0;i<lineCSV.length;i++) {
if (lineCSV[i]!="-DELETED-") {
CSV[j] = lineCSV[i];
j++;
}

}

return CSV;
}

function roundVal(val_num){
var dec = 2;
var result = Math.round(val_num*Math.pow(10,dec))/Math.pow(10,dec);
return result;
}

function setdecimalpoints(deca)
{
var deca1= deca;
var deca2= parseInt(deca);
if((deca1-deca2)!=0)
{
return 2;
}
else
{
return 0;
}
}
for(i=0;i

Charts loading…
Charts loading…
Charts loading…
Charts loading…
Charts loading…
Charts loading…
Charts loading…

—————————–

Ian Dobbs is a currency analyst with Direct FX You can contact him here »