Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

andre-salvati/stocks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

9 Commits

Repository files navigation

Stock portfolio analysis

This mini project enables:

  • track realtime results of your stock portfolio
  • track historic results of your stock portfolio

Instructions

  • Install the following R libraries.

    install.packages("tidyverse")
    install.packages("readxl")
    install.packages("lubridate")
    install.packages("googledrive")
    install.packages("tidyquant")
    
  • Copy and fill the blue cells in the template spreadsheet with your current positions. The spreadsheet uses GoogleFinance functions to update quotations with a 20-minute delay.

  • Update the code with the Google Drive ID of your spreadsheet.

    my_spreadsheet = "1H7APdQhZKSnUgFOefXTshJa1AwwW_H7eY3Tg4dgo-ts"
    
  • Run script, which will automatically:

    • connect to your Google Drive account (OAuth) and download the spreadsheet to local folder.
    • download daily quotations for each ticker from tidyquant.
    • generate charts.
  • If you buy or sell, update the spreadsheet and run the script again.

Sample Charts

About

Stock portfolio analysis

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

Contributors

Languages

AltStyle によって変換されたページ (->オリジナル) /