My Book is out!

I am happy to announce that my book about R and Finance (in portuguese) is finally available! The idea of writing a book about R started back in the end of 2015, when I decided to try something different than research papers. Writing a book was the first idea. I... [Read More]
Tags: R, book

How to calculate betas (systematic risk) for a large number of stocks

A comparison between using a loop, function by and the package dplyr

One of the first examples about using linear regression models in finance is the calculation of betas, the so called market model. Coefficient beta is a measure of systematic risk and it is calculated by estimating a linear model where the dependent variable is the return vector of a stock... [Read More]
Tags: R, stock market, beta, linear regression

Using R to download high frequency trade data directly from Bovespa

Using package GetHFData

Recently, Bovespa, the Brazilian financial exchange company, allowed external access to its ftp site. In this address one can find several information regarding the Brazilian financial system, including datasets with high frequency (tick by tick) trading data for three different markets: equity, options and BMF. [Read More]
Tags: R, GetHFData, vbovespa, market microstructure, high frequency