We're using cookies, but you can turn them off in your browser settings. Otherwise, you are agreeing to our use of cookies. Learn more in our Privacy Policy

R

# THE FOLLOWING CODE WORKS FOR PRICE, FUNDAMENTALS, AND ESTIMATES DATASETS (BOTH 1yr and 10yr)

# Unzip files and change to correct file path below
path <- "./estimates_hist_10Y_amer_20240726.csv"

# Load data
data <- read.csv(path)

# Look at sample of data
print(head(data))

# Inspect the size of the dataset
print(dim(data))

# Explore available data
print(colnames(data))

# Get price series of specific ticker
ticker <- "AAPL-US" # For Apple Inc.
ticker_series <- data[data$TICKER == ticker, ] # if price or estimates data
ticker_series <- data[data$Ticker == ticker, ] # if fundamentals data

Matlab

% THE FOLLOWING CODE WORKS FOR PRICE, FUNDAMENTALS, AND ESTIMATES DATASETS (BOTH 1yr and 10yr)

% Unzip files and change to correct file path below
path = './estimates_hist_10Y_amer_20240726.csv';

% Load data
data = readtable(path);

% Look at sample of data
disp(head(data));

% Inspect the size of the dataset
disp(size(data));

% Explore available data
disp(data.Properties.VariableNames);

% Get price series of specific ticker
ticker = 'AAPL-US'; % For Apple Inc.
ticker_series = data(strcmp(data.TICKER, ticker), :); % if price or estimates data
ticker_series = data(strcmp(data.Ticker, ticker), :); % if fundamentals data

Python

import pandas as pd

# THE FOLLOWING CODE WORKS FOR PRICE, FUNDAMENTALS, AND ESTIMATES DATASETS (BOTH 1yr and 10yr)

# Unzip files and change to correct file path below
path = "./estimates_hist_10Y_amer_20240726.csv"

# load data
data = pd.read_csv(path)

# look at sample of data
print(data.head())

# inspect the size of the dataset
print(data.shape)

# explore available data
print(data.columns)

# get price series of specific ticker
ticker = "AAPL-US" # For Apple Inc.
ticker_series = data[data.TICKER == ticker] # if price or estimates data
ticker_series = data[data.Ticker == ticker] # if fundamentals data