Showing posts sorted by relevance for query yen. Sort by date Show all posts
Showing posts sorted by relevance for query yen. Sort by date Show all posts

Monday, October 22, 2012

Resurrect Posts on Japan and the Yen

As the Yen and Japan continue to get more interesting in my mind, I just wanted to resurrect some posts that I have done on Japan and the Yen and sort them by my favorites.

Japan Trade by Geographic Region
Japanese Trade and the Yen
Japan Intentional or Accidental Pursuit of Deflation
Japan Trade More Specifically with Korea

Just to add a chart, here is one using data from the Federal Reserve Bank of St. Louis (FRED).  While the extreme correlation between the Yen and the S&P 500 has limited the opportunity available in the Yen, the correlation has recently weakened as Japanese deficits have worsened and the Yen stopped getting stronger.

From TimelyPortfolio

R code:

require(latticeExtra)
require(quantmod)

getSymbols("DEXJPUS",src="FRED")
getSymbols("SP500", src="FRED")

asTheEconomist(xyplot(DEXJPUS,main="US Dollars for Japanese Yen Since 1970\nSource: Federal Reserve Bank of St. Louis"))

#merge the weekly returns of Yen and SP500
ret <- na.omit(merge(weeklyReturn(DEXJPUS),weeklyReturn(SP500)))
#use the rolling correlation method from PerformanceAnalytics chart.RollingCorrelation
rollcor <- as.xts(rollapply(ret, width = 208, FUN = function(x) cor(x[,
                     1, drop = FALSE], x[, 2, drop = FALSE]), by = 1,
                     by.column = FALSE, na.pad = FALSE, align = "right"))
xyplot(na.omit(merge(SP500,rollcor,DEXJPUS)),col=brewer.pal("RdBu",n=9)[c(9,2,8)],
              lattice.options=theEconomist.opts(),
              par.settings=theEconomist.theme(box="transparent"),
              scale=list(y=list(rot=0)),
              xlab=NULL,
              strip=strip.custom(factor.levels=c("S&P 500","Correlation (Rolling 4 Year) S&P 500 and USD/Yen","USD/Japanese Yen")),
              main = "S&P 500 and USD/Yen Since 1970\nSource: Federal Reserve Bank of St. Louis")

Tuesday, February 1, 2011

Japanese Yen and US Treasuries

In the chart below, the close relationship of the Japanese Yen and US 10 Year Treasuries from 1993 to 2008 is clear.  However, the highly correlated instruments have moved opposite since the 2008 financial crisis. 

via StockCharts.com

I am struggling with what this means, and how I might benefit from the changed relationship.  I have imagined some of the reasons, but I’m still missing something. So far, my list:

1) Emerging market countries have diversified their reserves and bought more Japanese Yen, but this does not show up on IMF Reserves.

image

2) Yen and Treasuries are both now viewed as “safe” and “riskless”, so they are pursued as insurance similar to gold.  However, these only work simultaneously in a deflationary environment.  If inflation appears (I think it is here), but others clearly disagree, does the Yen get hurt with US Treasuries?

 

The credit default market clearly does not consider the Yen as riskless since Japan carries a higher default probability on its sovereign debt.

sovereigncds

3) Momentum investors are buying the Japanese Yen as the best performing reserve currency simply following a trend model.  However in the multi-trillion currency market, I do not think this influence would be strong enough to force this imbalance.

4) Maybe the Japanese Yen is the only thing in Japan that actually goes up, so the Japanese Yen is the place in Japan to make money.

image

It appears that these reasons do not offer adequate explanation for the continued Yen rise, so I need to do more work and be a little more creative figuring this out.  Please let me know if you have any good explanations.

After this thought exercise, I still believe that the situation is tenuous and certainly cannot find any good reasons to own the Japanese Yen.

 

2.5 hours

Wednesday, March 7, 2012

Japanese Trade and the Yen

I have had the pleasure over the last couple of weeks to help plan the CFA Society of Alabama 2012 Dinner featuring Jim Rogers and Barron’s Senior Editor Jack Willoughby.  The event was fantastic, and I would like to publicly thank Jim Rogers and Jack Willoughby for investing so much time and effort into the State of Alabama.  Both are incredible men, and I was delighted to meet them.

Jack Willoughby challenged Jim Rogers’ statement “you must understand currencies” with the point that  leveraged forex trading that has grown popular is not suitable for investors.  Jim responded by saying currencies seem unsafe just like all investments seem unsafe before a bull run, and that with proper education and management, currencies represent outstanding opportunities.  I think both are right.

Over a year ago in Japan Intentional or Accidental Pursuit of Deflation, I contended that the persistently appreciating Yen was starting to pose an extreme competitive disadvantage to the Japanese exporters.  Korean electronic, auto, and appliance manufacturers (LG, Samsung, Hyundai, Kia, etc.) have exploded their market share in the US due to their huge pricing advantage over their Japanese neighbors discussed recently in Hyundai Motor Europe confident on 2012 goal

“…Japanese rival Toyota, which has been overshadowed by the success of South Koreans in Europe in recent years, said good products backed by a currency which is 'extremely competitive' make Hyundai and Kia outperform the market.

'It is probably the mirror of the yen,' Mr Alain Uyttenhoven, vice-president at Toyota Europe, told reporters, referring to the strong yen that hurt Japanese carmakers. “

Japan seems very slow to change, but the Yen seems to have finally found a limit as the Japanese now suffer a significant trade deficit with the world.  The Japanese no longer can pursue the harmful Yen policy of the past.  Instead of Yen to US$ and Euro, they should focus on the Yen versus their competing Asian currencies.

From TimelyPortfolio

The question then becomes does this represents an opportunity for investors, and if it does, how do you go from US stocks and bonds to a short Yen long emerging currency position?

R code from GIST:

Thursday, February 3, 2011

Japan Intentional or Accidental Pursuit of Deflation

Japan’s intentional or accidental pursuit of deflation has caused an imbalance far greater than Bernanke’s pursuit of inflation.  Japanese policymakers have allowed Yen appreciation versus all other currencies.  It appears that they recognize a couple of things:

1) Higher interest rates and inflation represent a much bigger risk to their credit risk, deficit funding, and aging population than deflation.

2) Developed markets are saturated by Japanese goods, and further Yen appreciation does not cripple those exports.

However, by recognizing these two items, they are allowing their competition and potential growth engine in the emerging markets to completely take advantage of them.  Hyundai and Samsung in Korea have a 30-50% price advantage over their Japanese competition.

Japan’s desperate attempt to avoid their inevitable collapse from higher rates and inflation is speeding their collapse caused by emerging market competition.  The markets eventually will impose the adjustment to the Japanese situation.  At least Bernanke recognizes the imbalance caused by undervalued Asian currencies and knows that inflation is the only mechanism to force Asian emerging nations to allow their currencies to appreciate to normal valuation even if it means hard decisions for the US eventually.

Lower interest rates encourage imbalances, while higher interest rates force the changes necessary to correct these imbalances.

Since the absolute worst of the Asian collapse in 1997, is Japan better off than the emerging Asian nations?

image

Since 2007, is Japan better off than the emerging Asian nations?

image

As a point of reference, here is OECD’s calculation of Purchasing Power Parity for the Korea versus Japan 184, which means the Korean Won is undervalued versus the Japanese Yen by 84%.  The Economist’s Big Mac Index shows undervaluation of Asian currencies versus the Yen to be 40-50%.

The Japanese decision has been treated unkindly in the equity markets

via StockCharts.com

 

For the r geeks here is the code:

require(quantmod)
require(PerformanceAnalytics)

#get asian currency data from the FED FRED data series
getSymbols("DEXKOUS",src="FRED") #load Korea
getSymbols("DEXMAUS",src="FRED") #load Malaysia
getSymbols("DEXSIUS",src="FRED") #load Singapore
getSymbols("DEXTAUS",src="FRED") #load Taiwan
getSymbols("DEXCHUS",src="FRED") #load China
getSymbols("DEXJPUS",src="FRED") #load Japan

asian<-merge(DEXKOUS,DEXMAUS,DEXSIUS,DEXTAUS,DEXCHUS,DEXJPUS)

#do dailyReturn so that I can use pretty PerformanceAnalytics charts
#division puts currencies in Japanese yen from US dollar
asianreturn<-merge(dailyReturn(asian[,6]/asian[,1],subset="1996::"),dailyReturn(asian[,6]/asian[,2],subset="1996::"),dailyReturn(asian[,6]/asian[,3],subset="1996::"),dailyReturn(asian[,6]/asian[,4],subset="1996::"),dailyReturn(asian[,6]/asian[,5],subset="1996::"))

#label columns for graph legends
colnames(asianreturn)<-c("Korea","Malaysia","Singapore","Taiwan","China")

chart.CumReturns(asianreturn,ylim=c(-0.4,0.4),legend.loc="topright",main="Asian Currencies in Japanese Yen",ylab="",period.areas=list(c("Sep 97","Dec 97"),c("Jun 04","Nov 06"),c("Dec 07","Mar 09")),period.color="gray",event.lines=c("Dec 97","Nov 06","Mar 09"),event.labels=c("Asian Tiger Collapse","Carry Trade","Financial Crisis"),event.color="black")
mtext("Source: Federal Reserve FRED",side=1,adj=0)

chart.Drawdown(asianreturn['2006-11-30::',],legend.loc="right",main="Asian Currencies in Japanese Yen",ylab="Drawdown Since Financial Crisis")
mtext("Source: Federal Reserve FRED",side=1,adj=0)

 

 

3.5 hours

Tuesday, March 13, 2012

Japan Trade More Specifically with Korea

Macro analysis of Japanese trade in posts Japanese Trade and the Yen and Japan Trade by Geographic Region revealed some very interesting changes.  Since the Korean Won is so undervalued versus the Japanese Yen on a Purchasing Power Parity (PPP) basis, I was very interested in how this undervaluation might have affected Japanese and Korean trade between themselves and with the United States.  The 2008-2009 financial crisis ended the growing Japanese surplus with Korea, and currently the Japanese surplus with Korea is at its lowest level since January 2003.

From TimelyPortfolio

When we look at the Japanese and Korean deficits with the United States, we can see Korea has maintained the level of surplus achieved prior to the 2008-2009 financial crisis, while the Japanese surplus has eroded rapidly over that same time frame.

From TimelyPortfolio

If the Korean Won appreciates versus the Yen, will Korean exporters maintain their recent market share gains?  If the Korean Won appreciates versus the Yen, will there be any impact on the US $?  If there is unexpected inflation, will this exacerbate the Korean Won appreciation?

R Code from GIST:

Thursday, March 31, 2011

Asian Currency Opportunity

Asian currencies are fundamentally undervalued at an extreme level due to the Central Banks’ focus on the US$.  For those that regularly read my blog or happened to see me in SmartMoney, this will not surprise you,

“And investors can also buy emerging-market stocks in countries whose currencies appear undervalued, potentially seeing double gains from currency appreciation and stock price growth, Russell says.”

At this point, I have no idea where the stock markets of the world go, but fortunately, I do not need to care, since I am not an equity manager.  However, my best method of pursuing Asian currencies comes through emerging market equity etfs, so if I buy EWY Ishares Korea, I am also buying the Korean Won and shorting the US$.  I like all the Asian emerging currencies, but for this post want to focus on the Korean Won to avoid any additional confusion.  See my post Japan Intentional or Accidental Pursuit of Deflation for more in depth discussion of all the Asian emerging currencies.

Yesterday, three years from the 2007-2008 disaster and almost a year from the Flash Crash, the heavens seem to have opened and the skies seem to have cleared for the Korean Won vs the US$, Japanese Yen, and Euro. 

From TimelyPortfolio
From TimelyPortfolio

All of the potential currency profits that have so far been untapped from EWY now seem a real possibility,


via StockCharts.com

but if you’re like me and uncertain about the next direction of equity markets, then a spread trade with EWY long and IWM short can ease your equity fears.  However, feel free to blend the spread to your tastes.  I like to add a little short Japanese Yen.


via StockCharts.com

R code:

require(quantmod)
require(PerformanceAnalytics)

#get asian currency data from the FED FRED data series
getSymbols("DEXKOUS",src="FRED") #load Korea
getSymbols("DEXJPUS",src="FRED") #load Japan

#other symbol options
#getSymbols("DEXMAUS",src="FRED") #load Malaysia
#getSymbols("DEXSIUS",src="FRED") #load Singapore
#getSymbols("DEXTAUS",src="FRED") #load Taiwan
#getSymbols("DEXCHUS",src="FRED") #load China

#invert to get KRWUSD and JPYUSD
asian<-merge(1/DEXKOUS,1/DEXJPUS)

#do dailyReturn so that I can use pretty PerformanceAnalytics charts
#division puts currencies in Japanese yen from US dollar
asianreturn<-merge(dailyReturn(asian[,1]),dailyReturn(asian[,1]/asian[,2]))

#label columns for graph legends
colnames(asianreturn)<-c("KoreaUS","KoreaJapan")

chart.CumReturns(asianreturn["2007::2011"],legend.loc="right",main="Korean Won in US$ and Japanese Yen",ylab="")
mtext("Source: Federal Reserve FRED",side=1,adj=0)

 

Disclosure:  AS ALWAYS, THESE ARE MY OPINIONS AND THE FUTURE IS UNPREDICTABLE.  CONDITIONS CHANGE AND I ADJUST POTENTIALLY WITHOUT DISCLOSURE ON THIS BLOG.  YOU ARE ON YOUR OWN MAKING INVESTMENT DECISIONS, AND IN NO WAY AM I ADVISING YOU.  I TAKE NO RESPONSIBILITY FOR YOUR GAINS OR LOSSES.

Wednesday, January 12, 2011

Yen Impediment to Japanese Stocks

In the chart below, the restraint of the Japanese yen on the Nikkei 225 is very evident.  Based on my most likely scenario of higher inflation leading to appreciating Emerging Asian currencies as they abandon the US Dollar peg, Japanese exporters would benefit most greatly as their competitiveness improves dramatically.  For your portfolio to benefit from that scenario, go long Japanese stocks, long emerging market currencies, long commodities, short bonds, and short Euro/Yen/US$ reserve currencies.  It sure would be nice if there were a fund with all these exposures, but for now long ujpix, long eem, long tbt, and long dba/dbc should offer a reasonable substitute for the retail investor.  Buy and hold might finally be a good strategy again with this combination.

As usual, my thoughts are simply that and should not be construed as investment advice.  This suggestion could very easily lose money, and I might not notify you when it does, so you’re on your own.  Best of luck.

Nikkei Relative to Dow Jones World Monthly Performance with Japanese Yen overlay

via StockCharts.com

1 hour

Friday, February 1, 2013

Yen and JGBs Short-Term vs Long Term

I have read some articles arguing that the recent move in the Japanese Yen is overdone.  However, considering the short-term without regard to the long-term context is naïve and potentially dangerous.  Although I do not have significant proof, I believe long-term mean reversion can completely dominate short-term mean reversion hopes.  Just to provide some longer-term context, I thought I would offer some graphical aids.

From TimelyPortfolio

In my mind, the Yen selloff is only in its infancy.  For the move to truly engage, I think we need Japanese Government Bond (JGB) yields to move higher also, and if it does we are in a different paradigm than the last 20 years.  But, what do I know?

R code from GIST:

Wednesday, November 5, 2014

Update on JGBs versus USTs

Given the recent selloff in the Yen, I thought now would be a good time to update my favorite chart from Intended or Unintended Consequences.

image

For a true currency death spiral, rates need to move up rather than down.  It appears we are long way from that.

Long-time readers will know that I have been keenly interested in the Yen for the entire history of this blog http://timelyportfolio.blogspot.com/search?q=yen.

Code for this post: https://gist.github.com/timelyportfolio/5665790

Tuesday, February 1, 2011

Supplement to Yen Post with Warren Buffet Quote

I’m not as big a fan of Warren Buffett as most, but I thought his comments from his 1987 annual report fit item 2 on my yen post.

“We continue to have an aversion to long-term bonds (and may be making a serious mistake by not disliking medium-term bonds as well). Bonds are no better than the currency in which they are denominated…”

Japan is the most leveraged of all the developed nations and their most reliable debtor their own aging citizens have entered the spending phase.  For their currency and their bonds to be attractive to other debtors, their rates need to be competitive with the United States and Germany, and their currency need to be appropriately valued.

If you do not like Japanese bonds, neither should you like Japanese yen.

Friday, March 22, 2013

Production Quality Report with R and knitr on Yen

Sometimes I actually use my experiments for real work.  For example, I wanted to send an update  on the Japanese Yen.  This was a great opportunity to use the chart created in Shading and Points with xtsExtra plot.xts.

I was fairly pleased with the finished product (click here if embed does not show).


R sweave file from GIST:

Tuesday, May 28, 2013

Intended or Unintended Consequences

A quick glimpse at the US 10y Treasury Bond rate since 2000 seems benign with low volatility and a general downward trend.

require(latticeExtra)
require(quantmod)

US10y <- getSymbols("^TNX", from = "2000-01-01", auto.assign = FALSE)[,
4]

asTheEconomist(xyplot(US10y, scales = list(y = list(rot = 1)),
main = "US 10y Yield Since 2000"))



From TimelyPortfolio

However, if we plot the change in rate over 252 days or 1 year, we might wonder whether the rate is as benign as we initially surmised. Although this might seem like an acceptable intended consequence of the aggressive monetary easing by the US Fed, I fear that we will face the historically normal unintended consequences.

p1 <- asTheEconomist(xyplot(US10y - lag(US10y, 252), 
scales = list(y = list(rot = 0)), main = "US 10y Yield - Yearly Change"))
p1



From TimelyPortfolio

And if we use some Vanguard US Bond Funds (vbmfx and vustx) as a proxy for the US bond market Approaching the Zero Bound - Bonds, we see that we are now in a market different than the last 4 years.

require(directlabels)
require(reshape2)

getSymbols("VUSTX", from = "1990-01-01")
## [1] "VUSTX"
getSymbols("VBMFX", from = "1990-01-01")
## [1] "VBMFX"

bonds.tr <- merge(ROC(VUSTX[, 6], 250), ROC(VBMFX[,
6], 250))
colnames(bonds.tr) <- c("VanguardLongTsy", "VanguardTotBnd")
bond.funds.melt <- melt(as.data.frame(cbind(as.Date(index(bonds.tr)),
coredata(bonds.tr))), id.vars = 1)
colnames(bond.funds.melt) <- c("date", "fund", "totret250")
bond.funds.melt$date <- as.Date(bond.funds.melt$date)

p2 <- direct.label(xyplot(bonds.tr, screens = 1, ylim = c(-0.35,
0.35), scales = list(y = list(rot = 0)), col = theEconomist.theme()$superpose.line$col,
par.settings = theEconomist.theme(box = "transparent"),
lattice.options = theEconomist.opts(), xlab = NULL,
main = "Vanguard Bond Funds 250 Day Total Return"),
list("last.points", hjust = 1, cex = 1.2))
p2



From TimelyPortfolio

p3 <- asTheEconomist(horizonplot(totret250 ~ date |
fund, origin = 0, horizonscale = 0.05, data = bond.funds.melt,
strip = TRUE, strip.left = FALSE, par.strip.text = list(cex = 1.1),
layout = c(1, 2), main = "Vanguard Bond Funds 250 Day Total Return"))
p3



From TimelyPortfolio

# print(p2,position=c(0,0.4,1,1),more=TRUE)
# print(update(p3,main=NULL),position=c(0,0,1,0.5))

Comparison to Japan


For some reference, let's look at a country getting quite a bit of attention lately in the press. We can add US yields to my favorite chart from Japan - JGB Yields–More Lattice Charts. Most of the difference is in the short end of the curve where the US is still near the minimum since 2012 while Japan is near the max out to 7 years.

url <- "http://www.mof.go.jp/english/jgbs/reference/interest_rate/"
filenames <- paste("jgbcme",c("","_2010","_2000-2009","_1990-1999","_1980-1989","_1974-1979"),".csv",sep="")

#load all data and combine into one jgb data.frame
jgb <- read.csv(paste(url,filenames[1],sep=""),stringsAsFactors=FALSE)
for (i in 2:length(filenames)) {
jgb <- rbind(jgb,read.csv(paste(url,"/historical/",filenames[i],sep=""),stringsAsFactors=FALSE))
}

#now clean up the jgb data.frame to make a jgb xts
jgb.xts <- as.xts(data.matrix(jgb[,2:NCOL(jgb)]),order.by=as.Date(jgb[,1]))
colnames(jgb.xts) <- paste0(gsub("X","JGB",colnames(jgb.xts)))

#get Yen from the Fed
#getSymbols("DEXJPUS",src="FRED")

xtsMelt <- function(data) {
require(reshape2)

#translate xts to time series to json with date and data
#for this behavior will be more generic than the original
#data will not be transformed, so template.rmd will be changed to reflect


#convert to data frame
data.df <- data.frame(cbind(format(index(data),"%Y-%m-%d"),coredata(data)))
colnames(data.df)[1] = "date"
data.melt <- melt(data.df,id.vars=1,stringsAsFactors=FALSE)
colnames(data.melt) <- c("date","indexname","value")
#remove periods from indexnames to prevent javascript confusion
#these . usually come from spaces in the colnames when melted
data.melt[,"indexname"] <- apply(matrix(data.melt[,"indexname"]),2,gsub,pattern="[.]",replacement="")
return(data.melt)
#return(df2json(na.omit(data.melt)))

}


jgb.melt <- xtsMelt(jgb.xts["2012::",])
jgb.melt$date <- as.Date(jgb.melt$date)
jgb.melt$value <- as.numeric(jgb.melt$value)
jgb.melt$indexname <- factor(
jgb.melt$indexname,
levels = colnames(jgb.xts)
)
jgb.melt$maturity <- as.numeric(
substr(
jgb.melt$indexname,
4,
length( jgb.melt$indexname ) - 4
)
)
jgb.melt$country <- rep( "Japan", nrow( jgb.melt ))

#now get the US bonds from FRED
USbondssymbols <- paste0("DGS",c(1,2,3,5,7,10,20,30))

ust.xts <- xts()
for (i in 1:length( USbondssymbols ) ) {
ust.xts <- merge(
ust.xts,
getSymbols(
USbondssymbols[i],
auto.assign = FALSE,
src = "FRED"
)
)
}

ust.melt <- na.omit( xtsMelt( ust.xts["2012::",] ) )

ust.melt$date <- as.Date(ust.melt$date)
ust.melt$value <- as.numeric(ust.melt$value)
ust.melt$indexname <- factor(
ust.melt$indexname,
levels = colnames(ust.xts)
)
ust.melt$maturity <- as.numeric(
substr(
ust.melt$indexname,
4,
length( ust.melt$indexname ) - 4
)
)
ust.melt$country <- rep( "US", nrow( ust.melt ))

bonds.melt <- rbind( jgb.melt, ust.melt )

p4 <- xyplot(
value ~ date | maturity,
groups = country,
data = bonds.melt,
type = "l",
col = c(brewer.pal(9,"Blues")[5],brewer.pal(9,"Blues")[7]),
layout = c( length( unique( bonds.melt$maturity ) ), 1 ),
panel = function(x, y, subscripts, col, ...) {
panel.abline(
h = c(
sapply( by( y, bonds.melt[subscripts,"country"], summary ), min ),
sapply( by( y, bonds.melt[subscripts,"country"], summary ), max )
),
#if(!col){
col = col[1:length(unique(bonds.melt[subscripts,"country"]))]
#} else col = trellis.par.get()$superpose.line$col[1:length(unique(bonds.melt[subscripts,"country"]))]
)
panel.xyplot( x = x, y = y, subscripts = subscripts, col = col, ... )
panel.text(
x = x[ length(unique(x)) / 2],
y = mean(
c(
sapply( by( y, bonds.melt[subscripts,"country"], summary ), max )[1],
sapply( by( y, bonds.melt[subscripts,"country"], summary ), min )[2]
)
),
labels = paste0(unique(bonds.melt$maturity)[panel.number()],"y"),
cex = 0.8,
#font = 2,
col = "black",
adj = c(0.5,0.5)
)
},
scales = list(
x = list(
draw = FALSE
#tck = c(1,0),
#alternating = 1,
#at = min(bonds.melt$date),
#labels = format(min(bonds.melt$date),"%Y")
),
y = list( tck = c(1,0), lwd = c(0,1) )
),
strip = FALSE,
par.settings = list(axis.line = list(col = 0)),
xlab = NULL,
ylab = "Yield",
main = "JGB and US Yields by Maturity Since Jan 2012"
)
p4 <- p4 + layer(
panel.abline(
h = pretty(bonds.melt$value,4),
lty = 3
)
)
p4



From TimelyPortfolio

Replicate

Gist source: https://gist.github.com/timelyportfolio/5665790

Wednesday, October 12, 2011

Generosity of Asian Central Banks

The only thing that separates the United States from Europe and the notorious PIIGS is the generosity of Asian Central Banks who have been consistently quantitatively easing since 1998 (Join the Reserves).

From TimelyPortfolio

Without this generosity, the United States could very easily have entered a death spiral (see Death Spiral of a Country and Death Spiral Warning Graph) in 2008 and still might fall into this disastrous trap.

Deliberately attacking this very tenuous thread seems foolish, but this foolish action has found support with our fine politicians Washington Post "Senate approves China currency bill".  The US needs to recruit some US $ buyers, but unfortunately there are none to fill the multi-trillion dollar gap.

Even more concerning is the focus on China who has been steadily attacking the problem.  The focus on China does not make sense when you look at the appreciation of the Chinese Yuan.  I see a lot more Korean cars on the road and TVs and appliances in the stores, but I do not hear any mention of the extreme undervaluation of the Korean Won to the US$ but especially the Japanese Yen, so it appears the Koreans Won.

From TimelyPortfolio

I agree that the US$ reserve building needs to stop, but let’s not deliberately induce a positive feedback death spiral.

R code (click to download from Google Docs):

require(quantmod)
require(PerformanceAnalytics)

getSymbols("DEXCHUS",src="FRED")
getSymbols("DEXKOUS",src="FRED")

plot.zoo(merge(1/DEXCHUS,100/DEXKOUS)["1997::",],screens=1,lwd=2,
    col=c("lightblue4","antiquewhite4"),
    xlab="Year",ylab=NA,
    main="Chinese Yuan and Korean Won
    1997 to Sep 2011")
legend("right", c("China","Korea"), lwd = 2, bty="n",
    col=c("lightblue4","antiquewhite4"),y.intersp=2,
    text.col=c("lightblue4","antiquewhite4"))

Thursday, February 24, 2011

If Things Are So Bad, then Why??

If things are so bad, then why are stocks only down as much as the safehavens (gold, bonds, and yen) are up over the last 5 days?  This is very strange to me.

via StockCharts.com

Friday, January 13, 2012

Are We Japanese?

Most of the discussion trying to determine if the U.S. is Japan 20 years later focuses on the economy and the stock market.  However, one of the biggest and most persistent correlations between Japan and the U.S. are the Japanese Yen and the U.S. 10 Year Treasury Yield.  I think it is essential to really try to explore this relationship to help determine “How Japanese are we?”  With the US $ in decline, it is hard to imagine the continued persistence of this dynamic. (Thanks reader teramonagi for catching an error.)

From TimelyPortfolio

For additional thoughts on Japan, please see my post Japan Intentional or Accidental Pursuit of Deflation.

R code in GIST:

Thursday, October 20, 2011

Since My Last Trip to Disney


My family is off to DisneyWorld for a week, so there will not be any posts while I am there. However, I thought it would be interesting to see how Disney stock has done since my last trip September 2010.
Maybe since Disney has done so poorly, the crowds will be smaller. Of course I know better than that.
Maybe since the Japanese Yen has continued to do so well, there will be more Japanese at the parks.
It is interesting how well XLY (Consumer Discretionary) over the last 1 year. I guess US consumers really are special.
From TimelyPortfolio
R code:
require(quantmod)
require(PerformanceAnalytics)


tckrs <- c("spy","xly","dis","eem","fxy")


getSymbols(tckrs,from="2010-09-15",to=Sys.Date(),adjust=TRUE)


stocks <- merge(DIS[,4],SPY[,4],XLY[,4],EEM[,4],FXY[,4])
colnames(stocks) <- c("DIS","SPY","XLY","EEM","FXY")
stocks.roc <- ROC(stocks,n=1,type="discrete")
stocks.roc[1,] <- 0


charts.PerformanceSummary(stocks.roc,lwd=2,
    colorset=c("indianred3","steelblue4","darkolivegreen3","gray70","purple"),
    main="Since My Last Trip to Disney",cex.legend=1.2)

Thursday, March 10, 2011

Absurdly Illogical-Gross Sells Treasuries to be Long US Dollar-What???

I saw this and at first thought Bill Gross made comments alluding to this.  However, it is just an illogical and somewhat absurd analysis of his remarks.

    Why Is Bill Gross Betting On A Vicious Move Higher In The Dollar?

    businessinsider

    Joe Weisenthal, On Thursday March 10, 2011, 7:05 am EST

    Yesterday PIMCO reported that it had completely abandoned US government bonds.

    Perhaps more importantly, PIMCO now has a gigantic position in cash -- it's biggest ever.

    Is PIMCO betting on a vicious rally in the dollar?

    There are a few reasons it could happen:

    • The crackup of the Eurozone will help the dollar.
    • The end of QEIII is looking more and more likely.
    • Anti-dollar sentiment is extreme.
    • Commodities are all looking peakish, etc.
    • Aggressive spending cuts in DC.

    The signs are building up.

    Unfortunately, I had to do something I don’t like to do to find out--read his outlook.  In it, he states

    An inflation-adjusted “negative buck” might be more likely.

    which I interpret to mean losses on interest rates and the US dollar.

    If (and I think a hugely doubtful if this time around) the US maintains the status quo with the dollar as reserve currency for the world, then all of the events listed below incite a rally in US Treasuries, in which Bill Gross would want to participate.  Neither Bill Gross nor his fund receive any benefit from being long a US dollar, since he and his clients are already implicitly long the dollar and he is measured by US bonds.  Selling US Treasuries and holding US dollars as cash implies a belief that US interest rates move higher.  What most likely causes US interest rates to move higher are inflation through higher commodity prices, continued stimulative and aggressive monetary policy, and/or abandonment of the US dollar as a reserve currency.  However, strangely enough, each of those reasons leads to the other two.  Monetary policy is inflationary and leads to higher rates and eventual loss of confidence in the Fed and abandonment of the US dollar as reserve currency; and similarly but in reverse inflation through higher commodity prices causes Emerging Asia to rectify their undervalued currencies by selling US Treasuries and US dollars but does nothing to stop Ben Bernanke and Fed policy.

    The Fed has lost its ability to be lender of last resort, so now the lender of last resort is emerging Asia.

    US interest rates and really everything are entirely dependent on the US dollar as a reserve currency in an imbalanced and vulnerable global situation.  The only thing that fixes these imbalances are lower US dollar and higher rates, and we do not get one without the other, and we don’t get any without some considerable pain.  I always shutter when I hear “This time is different,” so let me be clear,

    last time 2007-2009 was different

    and what happens next will be the same as all of recorded financial history as the US finds the limits to its monetary and fiscal policy.

    Now, the real question is what reserve currency fails first and faces speculative attack.  If it is the Euro, then the US dollar probably rallies, and we’re stuck in an imbalanced system.  If it is the British Pound or Japanese Yen, then the first line of defense will be to sell the US dollar and US Treasuries, which then leads to a domino effect and US dollar failure.  If it is the US dollar, then I don’t know what to do except be short everything except Emerging Asian currencies and potentially the only thing of value in the US (agricultural commodities).

    I feel very fortunate to be a US citizen, but I have also resolved to not let my citizenry blind my investment policy and implicitly get me even more leveraged to the US dollar.  US investors do not have to face the same fate as US citizens.

    Sunday, February 3, 2013

    Japanese Government Bonds (JGB) Total Return Series

    In a follow up to Yen and JGBs Short-Term vs Long Term and a series of posts on Japan, I thought the Bloomberg article "Japan Pension Fund’s Bonds Too Many If Abe Succeeds, Mitani Says" was particularly interesting.  It is difficult to find a total return series for the JGBS, so here is an example of how we might construct it in R with the JGB 9 year. Using the 9 year gets us about a decade more data than the 10 year.  The calculation is not perfect but it gets us very close.

    The Japanese Pension Fund (GPIF) has been spoiled by a very pleasant ride with their JGBs.

    From TimelyPortfolio

    R code from GIST:

    Friday, January 14, 2011

    “Dumb Money”

    In the financial industry, there always seems to be a discussion about “Dumb Money.”  Generally, “Dumb Money” is used to describe the retail investor, but based on Ned Davis Research, all stock price gains over the last 50 years came when there were inflows to equity mutual funds, so this would indicate “Dumb Money” might actually be “Smart Money.”

    Also, it seems that “Dumb Money” is always the money made by someone else with a view opposite of yours.  Jealousy and bitterness often seems to be the source of this “Dumb Money” classification.  John Hussman seemed to fall in this category with this weekly commentary "Profiting from the Tooth Fairy", which with hindsight seems clearly wrong.  However, his definition of “Dumb Money” in this same post probably fits very well with mine

    “‘catching’ gains from speculative investment themes that have a high probability of collapsing” or (my addition) where risk dramatically exceeds potential returns.

    With this in mind, what was the “Dumb Money” last year?  I think US bonds, gold, and Japanese Yen, but I might just be bitter or jealous.  By the end of 2011, we’ll know the truth.

    image

     

    1 hour

    Wednesday, May 25, 2011

    Eigen-who? How Can I Write About Eigen-anything and Expect You to Read?

    After the very nice Convore reply

    @timelyportfolio some of your posts include "eigenvalue ratio plots" -- kindly tell us what they show and how they might be useful in constructing a portfolio.

    I felt like I should at least attempt to offer a little more detail on eigenvectors, which allow us to visually see similarity between variables (in my mind, time series of asset classes, indexes, stocks, or other financial prices).  In other posts, I have used the fAssets package function assetsCorEigenPlot for Long XLU Short SPY and  Russell Napier, ASIP in FT Says Emerging Market CurrenciesMichael Friendly’s wonderful paper does a very fine job of explaining eigenvalues and their use in sorting for helpful visualizations of correlation.  Wikipedia also gives a decent introduction in these two articles http://en.wikipedia.org/wiki/Principal_component_analysis and http://en.wikipedia.org/wiki/Eigenvector.  Also, I’m anxious to read the following book whose authors run http://factominer.free.fr/classical-methods/index.html

    Really, the closer the variables in distance and angle, the more closely they are related.  I thought some currency data from the St. Louis Fed would provide a nice example.  Similar to milktrader’s Chop, Slice and Dice Your Returns in R, I also wanted to show multiple ways in R of achieving a plot of eigenvalues with fAssets, SciViews, and corrgram.  This analysis does not yield any real surprises—Mexican Peso and Brazilian Real are closely related, but both are least related to the Japanese Yen.

    From TimelyPortfolio
    From TimelyPortfolio
    From TimelyPortfolio

    Since I used Michael Friendly’s paper so much in writing this article, I wanted to show a corrgram of the currency data.  The corrgram package offers lots of potentially useful variations of this visualization.

    From TimelyPortfolio

    The second part of the Convore question is how can we use eigenvalues to construct a portfolio.  Maybe I can answer that in one of my next posts…

    R code:

    #explain basics of principal component analysis
    #by showing the various methods of charting eigenvalues
    #of currency data   #give specific credit to Michael Friendly
    #and his paper http://www.math.yorku.ca/SCS/Papers/corrgram.pdf
    #another example of similar techniques used for both
    #baseball and finance   #for additional information on principal component analysis (PCA)
    #see http://en.wikipedia.org/wiki/Principal_component_analysis   require(quantmod)   #get currency data from the FED FRED data series
    Korea <- getSymbols("DEXKOUS",src="FRED",auto.assign=FALSE) #load Korea
    Malaysia <- getSymbols("DEXMAUS",src="FRED",auto.assign=FALSE) #load Malaysia
    Singapore <- getSymbols("DEXSIUS",src="FRED",auto.assign=FALSE) #load Singapore
    Taiwan <- getSymbols("DEXTAUS",src="FRED",auto.assign=FALSE) #load Taiwan
    China <- getSymbols("DEXCHUS",src="FRED",auto.assign=FALSE) #load China
    Japan <- getSymbols("DEXJPUS",src="FRED",auto.assign=FALSE) #load Japan
    Thailand <- getSymbols("DEXTHUS",src="FRED",auto.assign=FALSE) #load Thailand
    Brazil <- getSymbols("DEXBZUS",src="FRED",auto.assign=FALSE) #load Brazil
    Mexico <- getSymbols("DEXMXUS",src="FRED",auto.assign=FALSE) #load Mexico
    India <- getSymbols("DEXINUS",src="FRED",auto.assign=FALSE) #load India
    USDOther <- getSymbols("DTWEXO",src="FRED",auto.assign=FALSE) #load US Dollar Other Trading Partners
    USDBroad <- getSymbols("DTWEXB",src="FRED",auto.assign=FALSE) #load US Dollar Broad   #combine all the currencies into one big currency xts
    currencies<-merge(Korea, Malaysia, Singapore, Taiwan,
    China, Japan, Thailand, Brazil, Mexico, India,
    USDOther, USDBroad)
    currencies<-na.omit(currencies)
    colnames(currencies)<-c("Korea", "Malaysia", "Singapore", "Taiwan",
    "China", "Japan", "Thailand", "Brazil", "Mexico", "India",
    "USDOther", "USDBroad")
    #get daily percent changes
    currencies<-currencies/lag(currencies)-1       #using fAssets
    require(fAssets)
    assetsCorEigenPlot(as.timeSeries(currencies))       #using techniques from corrgram package documentation
    #get correlation matrix
    (currencies.cor <- cor(currencies,use="pair"))
    #get two largest eigenvectors
    (currencies.eig<-eigen(currencies.cor)$vectors[,1:2])
    e1 <- currencies.eig[,1]
    e2 <- currencies.eig[,2]
    #make the chart
    plot(e1,e2,col='white', xlim=range(e1,e2), ylim=range(e1,e2),
    main="Plot of 2 Largest Eigenvectors for Various Asian
    and American Currencies (corrgram)"
    )
    arrows(0, 0, e1, e2, cex=0.5, col="red", length=0.1)
    text(e1,e2, rownames(currencies.cor), cex=0.75)
    #run an interesting corrgram chart
    require(corrgram) #do not need for previous eigenvector plot
    df1 <- data.frame(cbind(index(currencies),coredata(currencies)))
    corrgram(df1, order=TRUE,
    main="Currency data PC2/PC1 order",
    lower.panel=panel.shade, upper.panel=panel.pie,
    text.panel=panel.txt)       #using techniques from SciViews package
    #do principal component analysis
    require(SciViews)
    (currencies.pca <- pcomp(~Korea + Malaysia + Singapore + Taiwan +
    China + Japan + Thailand + Brazil + Mexico + India +
    USDOther + USDBroad,
    data = currencies))
    #make the chart
    plot(currencies.pca, which = "correlations",
    main="Plot of 2 Largest Eigenvectors for Various Asian
    and American Currencies (SciViews)"
    )
    #more SciViews fun
    #summary(currencies.pca)
    #screeplot(currencies.pca)
    #currencies.ldg<-loadings(currencies.pca)
    #(currencies.cor <- correlation(currencies.pca))
    #plot(currencies.pca, which = "scores", cex = 0.8)
    #pairs(currencies.pca)         #compare 2 largest eigenvectors from the sciview and corrgram
    cbind(loadings(currencies.pca)[,1],e1,loadings(currencies.pca)[,2],e2)

    Created by Pretty R at inside-R.org