程序代写案例-B4
时间:2021-03-03
'Input sizing
numberofassets <- number of full cells on “row 4” - 2
numberofperiods <- number of full cells on “column D” - 1

'Processing
Select cell B4
Value of cell (numberofperiods rows down from, same column as) B4 <- "Average Return"
Value of cell (numberofperiods+1 rows down from, same column as) B4 <- "Recommendation"

Select cell A3
For a = 1 To numberofassets 'Processing each asset in turn
temp = 0 'temp will contain the average return for asset a

For p = 1 To numberofperiods 'Processing each period in turn

temp <- temp + Value of cell (p row down from, same column as) A3 *
Value of cell (p row down from, 2+a right column from) A3
Next p

'writing the results for asset a
Value of cell (numberofperiods +1 row down from, 2+a right column from) A3 <- temp
If temp > 0.05 Then
Value of cell (numberofperiods +2 row down from, 2+a right column from) A3 <- "Keep"
Else
Value of cell (numberofperiods +2 row down from, 2+a right column from) A3 "Remove"
End If
Next a




























学霸联盟


essay、essay代写