Publications by R and Finance
My first post!
A little bit about me and this blog – Hello everyone! This is the first (ever) post for a new blog about Finance and R. My name is Marcelo Perlin and my day job is assistant professor of Finance in Federal University of Rio Grande do Sul, in the city of south of Brazil (Porto Alegre). I received my PhD in Finance from Reading Univer...
1890 sym 2 img
How to download and organize financial data from yahoo finance for several tickers
Using package BatchGetSymbols – One of the great things of working in finance is that financial datasets are freely available from sources such as Google and Yahoo Finance. This is an excelent feature for building up to date content for classes and conducting academic research. In the past I have used function GetSymbols fr...
3200 sym R (2313 sym/4 pcs) 2 img
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 vari...
12317 sym R (9398 sym/13 pcs) 6 img
Searching for predatory journals and publishers with R
Using package predatory – The recent rise of publications in predatory journals is a big issue in the academic community and it hurts the development of science. This is especially true for developing countries such as Brazil, where the academic evaluation system is not yet well established. Surprinsingly, even standard imp...
3486 sym R (2613 sym/4 pcs) 2 img
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, op...
8279 sym R (8111 sym/8 pcs) 4 img
Building and maintaining exams with dynamic content
An introduction to package exams – Part of my job as a researcher and teacher is to periodically apply and grade exams in my classroom. Being constantly in the shoes of an examiner, you soon quickly realize that students are clever in finding ways to do well in an exam without effort. These days, photos and pdf versions of ...
9421 sym R (2983 sym/5 pcs) 2 img
Using R to study the evolution of Tennis
An analysis of point by point data – I’m a big fan of Tennis. When I’m not working in the university, you can probably find me in my favourite tennis club, Sogipa. What is so great about Tennis? It is a sport that challenges your physically and mentally. It forces you to your limit in both aspects. The more you play, th...
10499 sym R (6989 sym/8 pcs) 8 img
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 studied the current market of R books in Brazil and abroad and just started writing ...
1783 sym 2 img
Shiny+Exams
Serving book exercises in the web with Shiny and Exams – As you may know, I recently published a R book in amazon. I decided to keep R exercises out of the book and serve them freely over the web. This was not a difficult decision since I’m still writing and revising all questions. My experience tell me that good exercise...
1976 sym
Using R to study tennis players
Looking at winning records of ATP top players and Brazilian tennists – In the previous post about tennis, we studied how changes in ball’s composition in hard and grass courts affected the game back in 2000. In this post, we will analyse a different dataset from the same repository, and look at the players winning records...
9463 sym R (22876 sym/14 pcs) 6 img