發表文章

蔡睿樺JavaScript金融計算

蔡睿樺2021年1月期末考 現值 利率 期數 金流 終值

word

圖片
  年化利率 1.2%( 月利率 0.001) ,每月房貸繳交 20, 000 ,問貸款多少?     現值 $4,265,556 = 金流 / 利率 *(1-(1+ 利率 )- 期貨 ) 利率 0 期數 240 金流 20000 函數現值 -$4,265,556 pv( 利率 , 期數金流 )   年化利率 1.2%( 月利率 0.001) ,每月房貸繳交 20, 000 ,問貸款多少?     房貸金額 $28,132 = 利率 *6000000(1-1+ 利率 )- 期數 ) 房貸金額 - -$28,132 +=pmt( 利率茄數 6000000)

第16週

圖片
利率y(rate) 期數n(nper) 金流m(pmt) 終值f(fv) 參考劉任昌 金融市場講義 天大王學習HTML+CSS+JavaScript程式碼 劉任昌教學影片078 劉任昌教學的程式碼

第15週

圖片
利率y(rate) 期數n(nper) 金流m(pmt) 終值f(fv) 參考劉任昌 金融市場講義 劉任昌學習HTML+CSS+JavaScript程式碼

第14週Word+Excel+recording macro 錄製巨集+金融計算

圖片
  VERSION 5.00 Begin {C62A69F0-16DC-11CE-9E98- 00AA00574A4F} UserForm1    Caption         =   " 劉任昌 "    ClientHeight    =   4320    ClientLeft      =   105    ClientTop       =   450    ClientWidth     =   8565.001    OleObjectBlob   =   "UserForm1.frx":0000    StartUpPosition =   1  ' 所屬視窗中央 End Attribute VB_Name = "UserForm1" Attribute VB_GlobalNameSpace = False Attribute VB_Creatable = False Attribute VB_PredeclaredId = True Attribute VB_Exposed = False   Dim n As Integer Dim spec As String Const period As Integer = 4 Const maxerror As Double = 0.0000001 Dim payment(period) As Double ' 廣域變數  4  維度的陣列 Private Sub CommandButton1_Click()   Dim a, b, c, f, gap As Double   Dim l...

第13週word巨集+表單+Type Text+TypeParagraph+字串

圖片
Const period As Integer = 4 Const maxerror As Double = 0.0000001 Dim payment(period) As Double '廣域變數 4 維度的陣列 Private Sub CommandButton1_Click()   Dim a, b, c, f, gap As Double   Dim loopNumber As Integer   a = 0   b = 1   gap = 10   loopNumber = 10   payment(0) = TextBox1.Value   payment(1) = TextBox2.Value   payment(2) = TextBox3.Value   payment(3) = TextBox4.Value   f = npv(a)   If f = 0 Then      Label9.Caption = 0   ElseIf f < 0 Then      Label9.Caption = "內部報酬率小於 0."   Else      Do While gap > mexerror And Abs(f) > maxerror And loopNumber < 100        loopNumber = loopNumber + 1        c = (a + b) / 2        f = npv(c)        If Abs(f) > maxerror And gap > maxerror Then           If f > 0 Then             a = c ...

第12週 蔡睿樺 教你金融計算

躉繳 第1期 第2期 第3期 第4期 注意,包含首期躉繳的現金流量都大於0。 報酬率: 淨現值: 迴圈次數: 蔡睿樺向劉任昌學習的程式碼 <style> .Takming { border: 20px outset yellow; background-color: green; color: white; text-align: center; } .pmt { width: 80px; height: 20px; background-color: yellow; color: black;   font-weight: bold; text-align: center;} </style> <table border="1">   <tbody><tr align="center"><td>躉繳</td><td>第1期</td><td>第2期</td><td>第3期</td><td>第4期</td></tr>   <tr><td><input class="pmt" type="number" /></td>     <td><input class="pmt" type="number" /></td>     <td><input class="pmt" type="number" /></td>     <td><input class="pmt" type="number" />     </td><td><input class="pmt" type="number" /...