Tuesday, March 29, 2011

Saturday, March 26, 2011

The subfiles LaTeX package

If your lifetime plan includes writing an article or a book, you may need to learn how write a rather large document in LaTeX. Or maybe you are co-writing a document (Andrew and I did a big homework once and synchronizing files can be tricky).


One important thing is to use a file synchronizer like Windows Live Sync or Dropbox, but the other is to teach LaTeX to use multiple files.


The subfiles package can help with that. The documentation for subfiles is here.


It allows you to write a master file and several subfiles that can be compiled independently, so you can work on and compile each subfile (for example, a chapter or a section) and see the results, and compile the master file to see the full book. A simple and useful example can be found in Wikibooks.



Wednesday, March 23, 2011

Libya rebels name US-based academic as finance chief | News by Country | Reuters

The relations between First Quantum and the Democratic Republic of Congo have gone from bad to worse in recent months, after the country expropriated the miner’s $765 million Kolwezi copper tailings project in September.   Blog 


via af.reuters.com



I was going to be his TA this quarter. Well, if he wants me, I'll still be!



Thursday, March 17, 2011

U.S. Reacts to Nuclear Danger: Panic for Potassium Iodide - TIME

The good news in Japan was that the winds had been pushing the radiated plumes from the stricken Fukushima Daiichi nuclear power plant out into the Pacific Ocean, away from populated areas. The winds would likely prevent more harm from happening to the earthquake-and-tsunami-battered region.


via www.time.com



The law of demand in action: a bottle of iodide pill went from $6 to $140 in the West Coast.



Wednesday, March 16, 2011

Tutorial: Portfolio Optimization Using R

I wrote a tutorial on how to implement some portfolio optimizers in R for a class. The tutorial implements three types of factor models:



  • A Fama-French three factor model

  • An industry cross-sectional model

  • A principal component analysis model


This is for instructional purposes only: it's not a software for you to plug in your portfolio and start investing. However, if you make millions doing so, I wouldn't mind a 10% cut.


Two things that are not in the tutorial but that are important if you really want to implement something for real use are:



  • Selecting the data that will be used for optimization (I use the Dow Jones Industrial Average from 2006 to 2010)

  • Optimizing Sharpe ratios by combining the portfolio with a risk-free asset (such as T-bills)


Download Factor Models



Monday, March 14, 2011

The Durbin Amendment

I recently had to prepare a paper about the impacts of the Dodd-Frank legislation for a class. Rather randomly, I chose the Durbin Amendment, a provision that increases regulation on the debit card market. What I learned about the debit and credit card market was fascinating.


The amendment passed into law in July 2010 and the Fed is now discussing how it will be regulated, and this is where the relevant points appear. For example, the amendment requires a price cap on the fees that merchants have to pay, but it doesn't say how much. The average fee in 2010 was about 44 cents, and the Fed set the cap at 12 cents, cutting heavily into the profits of (I can safely say)  your bank. As a consequence, you may pay more for checking, but is this really bad?


Download Durbin Amendment



Thursday, March 10, 2011

Managerial economics (B ECON 300) class notes

It is very possible that many of my Managerial Economics students will scour the web for class notes (instead of using the course website). And maybe, just maybe, after spending some time on Wikipedia's article on Managerial Economics and in some random essay mills, they may find the lecture notes here.


It's very possible that looking at the course website would have been faster, but the course website is not integrated with Facebook and not accessible through Google, so I'm just making it easy on them.


Download Managerial Economics Lecture Notes



Wednesday, March 09, 2011

Quantitative Easing Explained

via www.youtube.com



The part about the CPI is priceless.

(sorry about the cheap pun!)



Tuesday, March 08, 2011

xkcd: Advertising



via xkcd.com



Nothing more annoying for a mathematician (of sorts) than the "up to 15% or more"...



The joy of copulas: An R tutorial

I explore copulas by creating a model with four funds that track market indexes
for stocks, bonds, dollar and commodities. I then use the model to generate simulated values
and test the performance of a model portfolio using the real returns and the simulated returns
to calculate the value at risk (VaR) and the expected shortfall (ES).


Download Copulas



Monday, December 15, 2008

Can Windows Live Writer Beta cross-post seamlessly?

I’m now using Windows Live Writer Beta to write my blog entries. This new year will be crazy. Another child, MBA, Ph.D. application, maybe a new job. That’s likely to be too much for the best of us, so anything that saves even a little time helps.

Thursday, November 02, 2006

Windows Live Messenger v8.1 Beta:

 Ah, uma nova versão do meu produto preferido - o Windows Live Messenger. Algumas novidades:

- Seu "nome" e foto aparecem de qualquer computador que você entre.

 

- Contact cards estão mais bonitinhos e aparentemente mais fáceis de usar.

Aparentemente tem mais algumas mudanças "internas" e um bug com o Flash que acontece só no Vista. Estou usando o vista, mas ainda não vi o bug. O fix está abaixo (copiei do blog do Messenger):

------

Vista users please follow the work around below to avoid the "DEP flash crash".

1. Uninstall Flash Player (Click Start->Control Panel->Uninstall a Program, then select Flash Player)

2. Close Windows Live Messenger and any other programs that use Flash

3. Open Adobe public Flash Player beta site

4. Click "Download Installer for Windows Active X" to install

------

Link to Inside Windows Live Messenger:

Thursday, May 25, 2006

Starbucks em São Paulo?

Java Chip Frappuccino... :-)
 

O Michael não morreu

Foi interessante o episódio de ontem. Obviamente deixou mais perguntas abertas do que resolvidas. O Michael não morreu, mas tem pelo menos três personagens que podem ter ido pro beleléu. Curioso foi o pessoal falando em português no final.

Wednesday, May 24, 2006

Anuncio antecipadamente que o Michael morre no episódio de hoje

Sério. É básico de script. Crime e castigo. Quando não dá pra resolver a história de uma maneira boa, os escritores em geral matam o personagem, exceto o Stephen King e o Tolkien . O Stephen King destrói o mundo (com uma combinação aleatória de gripes, alienígenas e Tommyknockers) e o Tolkien apela pra umas águias convenientes. Deus Ex Machina.
 
Não deve ter Deus Ex Machina pro Michael. Então é cova mesmo.