Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Exam (elaborations)

Investment Modeling Exam 1 study guide

Rating
-
Sold
-
Pages
4
Grade
A+
Uploaded on
28-09-2025
Written in
2025/2026

Lab 1 – Compound returns - How to become wealthy: investing, equity, politics (NOT SALARY) - Fundamental data: important data for data analysis - Everything in R is a vector: if you don’t put in a value, automatically null - Format for calculating compound returns: P*(1+R)^4 + P*(1+R)^3 + P*(1+R)^2 + P*(1+R)^1 - Creating arrays: o b = c(1,5,7,2) #concatenates into an array o b = 1:5 #creates an array from values 1 - 5, inclusive o b = rep(3,5) #creates an array of the values "3" repeated 5 times o b = seq(2,10,2) # creates an array between 2 and 10 inclusive, with increments of 2 o b = seq(10,2,-2) #to go backwards with seq, must have negative increment value - IF/ELSE statement format if(condition){ expr1 } else{ expr2} - FOR LOOPS right side of for loop = vector you want to iterate through left side of for loop = iterator, any variable name, becomes each value in the original vector, from left to right a = 6:1

Show more Read less
Institution
Course

Content preview

Lab 1 – Compound returns
- How to become wealthy: investing, equity, politics (NOT SALARY)
- Fundamental data: important data for data analysis
- Everything in R is a vector: if you don’t put in a value, automatically null
- Format for calculating compound returns: P*(1+R)^4 + P*(1+R)^3 + P*(1+R)^2 + P*(1+R)^1
- Creating arrays:
o b = c(1,5,7,2) #concatenates into an array
o b = 1:5 #creates an array from values 1 - 5, inclusive
o b = rep(3,5) #creates an array of the values "3" repeated 5 times
o b = seq(2,10,2) # creates an array between 2 and 10 inclusive, with increments of 2
o b = seq(10,2,-2) #to go backwards with seq, must have negative increment value
- IF/ELSE statement format
if(condition){
expr1 }
else{
expr2}
- FOR LOOPS
right side of for loop = vector you want to iterate through
left side of for loop = iterator, any variable name, becomes each value in the original vector, from left to right
a = 6:1
for(i in a){
print(i)
}
Prints: 6/5/4/3/2/1
- New Functions
o NROW(a) or length(a): Tells you how many values in the array
- Vector Mathematics
b = 1:5
b<3 #for each value of b, checks if it is less than 3 and returns "true" or "false"

o Slicing
b[1:3] #shows values of "b" between 1:3, inclusive
b[c(1,4)] #shows the values of "b" number 1 and 4, good for when desired values not next to each other
b[c(2:1,3,5)] #slices in the order that you require

o Logical Slicing
b[b<3] = b[b<3]+ 5 #This takes the result of the b<3 functions, and for whichever values of "b"
which are true, adds 5, Put simply, each value of "b" which is <3 (AKA 1,2) has 5
added to it
b[b>=3] = b[b>=3]-5 #This is like the first logical slice, but instead of affecting values <3, we affect
>=3, which is the remaining values
#This results in 3,4,5 transforming to -2,-1,0
- Uniroot: Uniroot will enter values into a function until the return is 0, and then give the input variable
$root = Answer, $f.root = final value of function, $iter = # of iterations
$init.it = ??, $estim.prec = how much memory was allocated to calculate answer




This study source was downloaded by 100000899606070 from CourseHero.com on 09-27-2025 21:02:42 GMT -05:00


https://www.coursehero.com/file/182188998/Investment-Modeling-Exam-1-study-guidedocx/

Written for

Course

Document information

Uploaded on
September 28, 2025
Number of pages
4
Written in
2025/2026
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

$8.49
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Get to know the seller
Seller avatar
ScholarShark

Get to know the seller

Seller avatar
ScholarShark (self)
Follow You need to be logged in order to follow users or courses
Sold
-
Member since
7 months
Number of followers
0
Documents
17
Last sold
-

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions