Lab07_Bollinger_question

pdf

School

Purdue University *

*We aren’t endorsed by this school

Course

64000

Subject

Electrical Engineering

Date

Apr 3, 2024

Type

pdf

Pages

1

Uploaded by tabenacci

Report
Lab 07 Technical Indicators In the lecture we implemented Bollinger Bands. In this exercise, implement the following related technical indicators: Bollinger BandWidth https://school.stockcharts.com/doku.php?id=technical_indicators:bollinger_band_width %B Indicator https://school.stockcharts.com/doku.php?id=technical_indicators:bollinger_band_perce First develop the algorithm without writing the function, because it easier to debug in this way (by using head() or tail() to check intermediate outputs before moving on to the next step). After the algorithm is developed, turn the indicator into a function that take the whole data set (downloaded using quantmod) as input (use parameter name stock_data for it), and return the calculated technical indicator as a series. For Bollinger BandWidth, name your function Bollinger_BandWidth(stock_data). For %B Indicator, name your function PercentB(stock_data). Do not plot inside the function. Instead, plot the returned technical indicator outside the function. Test your functions on several different stocks. 1
Discover more documents: Sign up today!
Unlock a world of knowledge! Explore tailored content for a richer learning experience. Here's what you'll get:
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help