Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

4. Write a VBA subroutine to calculate cumulative returns (CR) over 1, 5, 10 and 30 days after each crossover. This subroutine also outputs

image text in transcribed

4. Write a VBA subroutine to calculate cumulative returns (CR) over 1, 5, 10 and 30 days after each crossover. This subroutine also outputs results for each buy signal in a new worksheet "buy", and for each sell signal in a new worksheet "sell", in the format below. Figure 2 A B C D E F G H 1 1-day CR # of buy 5-day CR # of buy 10-day CR # of buy 30-day CR # of buy 2 -0.00232 1 -0.01009 1 0.006793 1 0.053378 1 3 0 1 -0.0784 1 -0.06131 1 -0.09264 1 4 -0.01875 1 0.064984 1 0.327727 1 0.192697 1 Then, using excel, construct a summary result table across all the signals using the format in Table 2. Table 2 Summary statistics Holding Number period Strategy of Buy Number of Sell Average Average buy CR sell CR Buy-Sell 1 SMA 50, 200 5 SMA 50, 200 www 10 SMA 50, 200 30 SMA 50, 200 Note: Buy-Sell is the difference in returns between average buy CR and average sell CR.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Intermediate Financial Management

Authors: Brigham, Daves

10th Edition

978-1439051764, 1111783659, 9780324594690, 1439051763, 9781111783655, 324594690, 978-1111021573

More Books

Students also viewed these Finance questions

Question

Write a structured flowchart for prob.2.3

Answered: 1 week ago

Question

2. Compute the 1-D convolution between [-1,1] and [0,0,0,0,1,1,1,1]

Answered: 1 week ago