Looking back at 2019 and plans for 2020

I’m just about to leave for my vacation and, as usual, I’ll write about the highlights of 2019 and my plans for the year to come. First, let’s talk about my work in 2019.

Highlights of 2019

The year of 2019 was not particularly fruitful in journal publications. I only had two: Accessing Financial Reports and Corporate Events with GetDFPData, published in RBfin and A consumer credit risk structural model based on affordability: balance at risk published in JCR. Both are papers I wrote back in 2017 and 2018 and not new articles. Most of the papers I worked this year will be published in 2020 or 2021.

This year, I’m mostly proud of the publication of my book about investing in the fixed income markets Poupando e Investindo em Renda Fixa: Uma Abordagem Baseada em Dados. This was a special project, very different from the usual writing style of scientific research and, lots of fun to write. As a side effect, I learned a lot about the fixed income market in Brasil and it forced me to think objectively about a problem that is inherently subjective, personal finance and investing. Hopefully, in the future, I’ll write another book about the stock market and real state investing, a topic that I’m also very interested.

My main project this year is the work in the second edition of my R book Analyzing Financial and Economic Data with R. It took a major part of my working weeks and weekends, but its coming together. Soon I’ll be publishing it in Amazon. You can find more details about it in this previous post.

In the programming side, I wrote two new CRAN packages in 2019: simfinR and GetQuandlData. Both are featured in the new edition of my R book (soon to be published).

My blog posts in 2018

Let’s have a look at my blog posts so so far.

my.blog.folder <- '~/Dropbox/11-My Website/01-msperlin.com/content/post/'
post.files <- list.files(path = my.blog.folder, pattern = '.Rmd')

post.files
##   [1] "2017-02-16-Writing-a-book.Rmd"                           
##   [2] "2017-02-16-Writing-a-book.Rmd.lock~"                     
##   [3] "2017-12-06-Package-GetDFPData.Rmd"                       
##   [4] "2017-12-06-Package-GetDFPData.Rmd.lock~"                 
##   [5] "2017-12-13-Serving-shiny-apps-internet.Rmd"              
##   [6] "2017-12-13-Serving-shiny-apps-internet.Rmd.lock~"        
##   [7] "2017-12-30-Looking-Back-2017.Rmd"                        
##   [8] "2017-12-30-Looking-Back-2017.Rmd.lock~"                  
##   [9] "2018-01-22-Update-BatchGetSymbols.Rmd"                   
##  [10] "2018-01-22-Update-BatchGetSymbols.Rmd.lock~"             
##  [11] "2018-03-16-Writing_Papers_About_Pkgs.Rmd"                
##  [12] "2018-03-16-Writing_Papers_About_Pkgs.Rmd.lock~"          
##  [13] "2018-04-22-predatory-scientometrics.Rmd"                 
##  [14] "2018-04-22-predatory-scientometrics.Rmd.lock~"           
##  [15] "2018-05-12-Investing-Long-Run.Rmd"                       
##  [16] "2018-05-12-Investing-Long-Run.Rmd.lock~"                 
##  [17] "2018-06-12-padfR-ed2.Rmd"                                
##  [18] "2018-06-12-padfR-ed2.Rmd.lock~"                          
##  [19] "2018-06-29-BenchmarkingSSD.Rmd"                          
##  [20] "2018-06-29-BenchmarkingSSD.Rmd.lock~"                    
##  [21] "2018-10-10-BatchGetSymbols-NewVersion.Rmd"               
##  [22] "2018-10-10-BatchGetSymbols-NewVersion.Rmd.lock~"         
##  [23] "2018-10-11-Update-GetLattesData.Rmd"                     
##  [24] "2018-10-11-Update-GetLattesData.Rmd.lock~"               
##  [25] "2018-10-13-NewPackage-PkgsFromFiles.Rmd"                 
##  [26] "2018-10-13-NewPackage-PkgsFromFiles.Rmd.lock~"           
##  [27] "2018-10-19-R-and-loops.Rmd"                              
##  [28] "2018-10-19-R-and-loops.Rmd.lock~"                        
##  [29] "2018-10-20-Linux-and-R.Rmd"                              
##  [30] "2018-10-20-Linux-and-R.Rmd.lock~"                        
##  [31] "2018-11-03-NewBlog.Rmd"                                  
##  [32] "2018-11-03-NewBlog.Rmd.lock~"                            
##  [33] "2018-11-03-RstudioTricks.Rmd"                            
##  [34] "2018-11-03-RstudioTricks.Rmd.lock~"                      
##  [35] "2019-01-08-Looking-Back-2018.Rmd"                        
##  [36] "2019-01-08-Looking-Back-2018.Rmd.lock~"                  
##  [37] "2019-01-12-GetDFPData-ver14.Rmd"                         
##  [38] "2019-01-12-GetDFPData-ver14.Rmd.lock~"                   
##  [39] "2019-03-09-pafdR-promotion.Rmd"                          
##  [40] "2019-03-09-pafdR-promotion.Rmd.lock~"                    
##  [41] "2019-03-10-pafdR-promotion_2.Rmd"                        
##  [42] "2019-03-10-pafdR-promotion_2.Rmd.lock~"                  
##  [43] "2019-03-23-Bettina-Case.Rmd"                             
##  [44] "2019-03-23-Bettina-Case.Rmd.lock~"                       
##  [45] "2019-04-13-Parallel-BatchGetsymbols.Rmd"                 
##  [46] "2019-04-13-Parallel-BatchGetsymbols.Rmd.lock~"           
##  [47] "2019-04-15-GetBCBData.Rmd"                               
##  [48] "2019-04-15-GetBCBData.Rmd.lock~"                         
##  [49] "2019-05-01-MeanVariance.Rmd"                             
##  [50] "2019-05-01-MeanVariance.Rmd.lock~"                       
##  [51] "2019-05-17-R-in-Brazil.Rmd"                              
##  [52] "2019-05-17-R-in-Brazil.Rmd.lock~"                        
##  [53] "2019-05-20-Lindy-Effect.Rmd"                             
##  [54] "2019-05-20-Lindy-Effect.Rmd.lock~"                       
##  [55] "2019-07-01-ftp-shutdown.Rmd"                             
##  [56] "2019-07-01-ftp-shutdown.Rmd.lock~"                       
##  [57] "2019-08-08-ftp-NOT-shutdown.Rmd"                         
##  [58] "2019-08-08-ftp-NOT-shutdown.Rmd.lock~"                   
##  [59] "2019-10-01-new-package-GetQuandlData.Rmd"                
##  [60] "2019-10-01-new-package-GetQuandlData.Rmd.lock~"          
##  [61] "2019-10-12-support-GetDFPData-shiny.Rmd"                 
##  [62] "2019-10-12-support-GetDFPData-shiny.Rmd.lock~"           
##  [63] "2019-10-16-new-package-GetEdgarData.Rmd"                 
##  [64] "2019-10-16-new-package-GetEdgarData.Rmd.lock~"           
##  [65] "2019-11-01-new-package-simfinR.Rmd"                      
##  [66] "2019-11-01-new-package-simfinR.Rmd.lock~"                
##  [67] "2019-11-25-feedback-TOC-afedR.Rmd"                       
##  [68] "2019-11-25-feedback-TOC-afedR.Rmd.lock~"                 
##  [69] "2019-12-02-dynamic-exercises-afedR.Rmd"                  
##  [70] "2019-12-02-dynamic-exercises-afedR.Rmd.lock~"            
##  [71] "2019-12-15-Looking-Back-2019.Rmd"                        
##  [72] "2019-12-15-Looking-Back-2019.Rmd.lock~"                  
##  [73] "2020-01-15-afedR-ed2-announcement.Rmd"                   
##  [74] "2020-01-15-afedR-ed2-announcement.Rmd.lock~"             
##  [75] "2020-02-25-afedR-ed2-slides-available.Rmd"               
##  [76] "2020-02-25-afedR-ed2-slides-available.Rmd.lock~"         
##  [77] "2020-03-29-garch-tutorial-in-r.Rmd"                      
##  [78] "2020-03-29-garch-tutorial-in-r.Rmd.lock~"                
##  [79] "2020-04-17-update-getdfpdata.Rmd"                        
##  [80] "2020-04-17-update-getdfpdata.Rmd.lock~"                  
##  [81] "2020-04-20-free-compiled-data-in-site.Rmd"               
##  [82] "2020-04-20-free-compiled-data-in-site.Rmd.lock~"         
##  [83] "2020-04-20-new-package-GetCVMData.Rmd"                   
##  [84] "2020-04-20-new-package-GetCVMData.Rmd.lock~"             
##  [85] "2020-04-25-investments-costs.Rmd"                        
##  [86] "2020-04-25-investments-costs.Rmd.lock~"                  
##  [87] "2020-05-24-pirf-is-online.Rmd"                           
##  [88] "2020-05-24-pirf-is-online.Rmd.lock~"                     
##  [89] "2020-05-27-call-for-papers-rac.Rmd"                      
##  [90] "2020-05-27-call-for-papers-rac.Rmd.lock~"                
##  [91] "2020-07-07-garch-tutorial-in-r-REVISED.Rmd"              
##  [92] "2020-07-07-garch-tutorial-in-r-REVISED.Rmd.lock~"        
##  [93] "2020-07-18-new_packages-GetFREData-GetDFPData2.Rmd"      
##  [94] "2020-07-18-new_packages-GetFREData-GetDFPData2.Rmd.lock~"
##  [95] "2020-12-22-Looking-Back-2020.Rmd"                        
##  [96] "2020-12-22-Looking-Back-2020.Rmd.lock~"                  
##  [97] "2021-02-18-dynamic-exercises-adfeR.Rmd"                  
##  [98] "2021-02-18-dynamic-exercises-adfeR.Rmd.lock~"            
##  [99] "2021-02-19-dynamic-exercises-adfeR.Rmd.lock~"            
## [100] "2021-02-20-adfeR-ed3-announcement.Rmd"                   
## [101] "2021-02-20-adfeR-ed3-announcement.Rmd.lock~"

The blog started in january of 2017 and, over time, I wrote 101 posts, around 33.6666667 per year. Let’s get more information from the .Rmd files. I’ll write function read_blog_files and use it for all post files.

read_blog_files <- function(f.in) {
  require(tidyverse)
  my.front.matter <- rmarkdown::yaml_front_matter(f.in)

  df.out <- data_frame(post.title = my.front.matter$title,
                       post.date = lubridate::ymd(my.front.matter$date),
                       post.month = as.Date(format(post.date, '%Y-%m-01')),
                       tags = paste0(my.front.matter$tags, collapse = ';'),
                       categories = paste0(my.front.matter$categories, collapse = ';'),
                       content = paste0(read_lines(f.in), collapse = ' '))

  return(df.out)
}

df.posts <- dplyr::bind_rows(purrr::map(post.files, read_blog_files))
## Warning: `data_frame()` is deprecated as of tibble 1.1.0.
## Please use `tibble()` instead.
## This warning is displayed once every 8 hours.
## Call `lifecycle::last_warnings()` to see where this warning was generated.
glimpse(df.posts)
## Rows: 50
## Columns: 6
## $ post.title <chr> "Writing a R book and self-publishing it in Amazon", "Pack…
## $ post.date  <date> 2017-02-16, 2017-12-06, 2017-12-13, 2017-12-30, 2018-01-2…
## $ post.month <date> 2017-02-01, 2017-12-01, 2017-12-01, 2017-12-01, 2018-01-0…
## $ tags       <chr> "R;book;self-publish", "R;GetDFPData;corporate events;fina…
## $ categories <chr> "R;book;self-publish", "R;GetDFPData;B3", "R;shiny;webserv…
## $ content    <chr> "--- title: \"Writing a R book and self-publishing it in A…

First, let’s look at the frequency of posts over time.

df.posts <- df.posts %>%
  filter(post.date >= as.Date('2019-01-01'), 
         post.date <= as.Date('2020-01-01'))

print( ggplot(df.posts, aes(x = post.month)) + geom_histogram(stat='count') +
         theme(axis.text.x = element_text(angle = 90, hjust = 1)) +
         labs(y = 'Number of posts', x = ''))
## Warning: Ignoring unknown parameters: binwidth, bins, pad

Checking 2019’s plans

At the end of 2018, my plans for 2019 were:

New edition of “Analyzing Financial and Economic Data with R”
in progress!
Work on my new book: “Investing For the Long Term” (provisory title)
Done! The first idea was to write a book about investing in general. I soon realized I would not be able to complete such task within one year. So, I decided to first write about the fixed income market and later, perhaps, write about stock markets and real state.
Solidify my research agenda in Board Composition
In progress. I’ve got four papers in development, two already submitted and two in the pipeline.

Plans for 2020

Publish afedR (analyzing financial and economic data with R)
My expectation is to publish the book in the first months of the year. I believe it is quite doable, unless something unexpected happens.
Finish board papers
Also doable. The working papers are in a good shape and should be submitted soon.
Start “personal finance project”
I’m not yet sure how to call it, but I’ve got a couple of ideas for creating a project all about helping people with their finances.
Marcelo S. Perlin
Marcelo S. Perlin
Associate Professor

My research interests include data analysis, finance and cientometrics.

comments powered by Disqus