Skip to content

Calculates total compensation for any given stock ticker based on the current stock price.

License

Notifications You must be signed in to change notification settings

darenr/total-comp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 

Repository files navigation

total-comp

Calculates total compensation for any given stock ticker based on the current stock price. Takes in as input company stock symbol, base salary & RSU's.

The equation is simple:

Total annual comp = base salary + (0.25 * number_RSUs * value of single RSU)

Uses the API from https://financialmodelingprep.com/ (thank you!) to look up staock price, then calculates annual total comp. No data leaves the browser except to look up the stock pric data. The calculations are all performed in the browser.

Example of using the FMP API

$(document).ready(function() {
 var url = "https://financialmodelingprep.com/api/v3/company/profile/ORCL";
  $.ajax({
    url: url,
    type: "GET",
    crossDomain: true,
    success: function (response) {  
      console.log(response['profile']['price']);
    },
    error: function (xhr, status) {
      alert("error");
    }
  });
});

About

Calculates total compensation for any given stock ticker based on the current stock price.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages