Great Deal! Get Instant $10 FREE in Account on First Order + 10% Cashback on Every Order Order Now

Consider the closing prices of QQQQ for the 50-business-day period from March 1, 2004, up to May 10, 2004. is the response of the 11-day EWMA filter with In the literature on trading, D[n] is...

1 answer below »

Consider the closing prices of QQQQ for the 50-business-day period from March 1, 2004, up to May 10, 2004.

is the response of the 11-day EWMA filter with In the literature on trading, D[n] is sometimes referred to as the “MACD signal.” (See Section 7.5.)

(b) Suppose that the stock is bought at the close on Day n when the value of D[n] rises above zero, and then the stock is sold at the close on Day n when D[n] falls below zero. Determine the days when there is a buy and the days when there is a sell.

(c) For each buy/sell signal found in part (b), determine the loss or gain per share. (d) Using your result in part (c), determine the net gain or loss per share over the 40-day period.

Answered 160 days After May 03, 2022

Solution

Baljit answered on Oct 11 2022
54 Votes
a. Plot D(n) using matlab:
Matlab code:
c=csvread('QQQQ.csv',1,4,[1 4 50 4]);
1=0.3;
a1=(1-b1)/(1-b1^11);
2=0.7;
a2=(1-b2)/(1-b2^11);
i=1:11;
w1=a1*(b1.^(11-i));
w2=a2*(b2.^(11-i));
for n=11:50;
y1(n)=w1*c(n-10:n);
y2(n)=w2*c(n-10:n);
d(n)=y2(n)-y1(n);
end
n=11:50;
plot(n,d(n),n,d(n),'o')
grid
xlabel('Day(n)')
ylabel('D[n]')
Plot:- Plot D(n) vs Number of days
    
Importing the data value of data vs co
esponding day
    Day
    D(n)
    Buy/Sell
    C(n)
    Loss/ Gain %
    Profit or loss
    Day 1
    -0.584
    Sell
    36.94
    -1.58095
    Loss
    Day 2
    -0.54245
    Sell
    37.21
    -1.4578
    Loss
    Day 3
    -0.29662
    Sell
    36.92
    -0.8034
    Loss
    Day 4
    0.190177
    Buy
    35.99
    0.528415
    Profit
    Day 5
    0.376049
    Buy
    35.68
    1.053949
    Profit
    Day 6
    0.003584
    Buy
    36.53
    0.009811
    Profit
    Day...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here