มูลค่าปัจจุบันสุทธิและกระแสเงินสด

Python เบื้องต้นสำหรับแนวคิดทางการเงิน

Dakota Wixom

Quantitative Finance Analyst

กระแสเงินสด

กระแสเงินสด คือชุดของผลกำไรหรือขาดทุนจากการลงทุนในช่วงเวลาหนึ่ง

Year Project 1 Cash Flows Project 2 Cash Flows
0 -$100 $100
1 $100 $100
2 $125 -$100
3 $150 $200
4 $175 $300
Python เบื้องต้นสำหรับแนวคิดทางการเงิน

สมมติอัตราคิดลด 3%

Year Cash Flows Formula Present Value
0 -$100 pv(rate=0.03, nper=0, pmt=0, fv=-100) -100
1 $100 pv(rate=0.03, nper=1, pmt=0, fv=100) 97.09
2 $125 pv(rate=0.03, nper=2, pmt=0, fv=125) 117.82
3 $150 pv(rate=0.03, nper=3, pmt=0, fv=150) 137.27
4 $175 pv(rate=0.03, nper=4, pmt=0, fv=175) 155.49

ผลรวมของมูลค่าปัจจุบันทั้งหมด = 407.67

Python เบื้องต้นสำหรับแนวคิดทางการเงิน

อาร์เรย์ใน NumPy

ตัวอย่าง:

import numpy as np
array_1 = np.array([100,200,300])
print(array_1*2)
[200 400 600]
Python เบื้องต้นสำหรับแนวคิดทางการเงิน

มูลค่าปัจจุบันสุทธิ

โปรเจกต์ 1

import numpy as np
np.npv(rate=0.03, values=np.array([-100, 100, 125, 150, 175]))
407.67

โปรเจกต์ 2

import numpy as np
np.npv(rate=0.03, values=np.array([100, 100, -100, 200, 300]))
552.40
Python เบื้องต้นสำหรับแนวคิดทางการเงิน

มาฝึกกันเถอะ!

Python เบื้องต้นสำหรับแนวคิดทางการเงิน

Preparing Video For Download...