1. Homepage
2. Programming
3. FIN551 - Python Programming - End-of-Course Assessment

FIN551 - Python Programming - End-of-Course Assessment

SUSSSingapore University of Social SciencesPython

FIN551 Python Programming

INSTRUCTIONS TO STUDENTS:

1. This End -of-Course Assessment paper comprises 6 pages (including the cover page).

2. You are to include the following particulars in your submission: Course Code, Title of the ECA, SUSS PI No., Your Name, and Submission Date.

3. Late submission will be subjected to the marks deduction scheme. Please refer to the Student Handbook for details.

Question 1

You are only required to submit a Jupyter notebook for this ECA. The use of Python modules is encouraged in this ECA. An analyst has a simple trading strategy. She believes that if the price of a stock is below (above) the floor (ceiling) price, the stock is under - (over -) valued and such instances are the best time to long (short) the stock. She wants to test if her hypo thesis is correct by back -testing it with historical stock prices.

The blue line in Figure 1 illustrates the weekly price trajectory of a stock in 2020. The vertical dotted line denotes the end of an observation period, since the start of a given year. Th e minimum and maximum prices in the observation period are labelled as the floor and ceiling prices respectively and they are denoted by the red and green lines in the figure.

Figure 1. Trading activities in the strategy due to the breaches of the floor/ceiling prices.

If the stock price falls below the floor price, the stock is deemed to be undervalued. The stock is acquired and will be held until it breaches the floor price again. You can assume you can hold fractional units of the stock. Transac tions due to breaches with the floor price are denoted by red triangle markers in Figure 1.

If the stock price is above the ceiling price, it is overvalued and will be sold short. You can assume you can short fractional units of the stock and the number of stocks you can short is dependent on your existing wealth level. The stock will be bought back when it is below the ceiling price. Transactions due to breaches with the ceiling price are denoted by green circular markers in Figure 1. In the figure, there are only 1 (one) pair of transaction occurring, as a result of the floor price, while there are 3 (three) pairs of transactions due to the ceiling price. All transactions must unwind by the last trading date in the year. Hence, if there are any open stock positions, they must unwind at the last traded price of the year. The result of these transactions resulted in a final wealth of \$1,132.90 (corrected to 2 (two) decimal points), if the strategy begins with an initial wealth of \$1,000. You are to implement the trading strategy in Python, given the following strategy inputs:

Figure 2. Python inputs for trading strategy

Make use of the alpha vantage module to download weekly prices of tgt_stock for the given year in Figure 2. (10 marks)

Question 2

Evaluate the floor and ceiling prices for the inputs given in Figure 2. Print the floor and ceiling prices, corrected to 2 (two) decimal points, clearly in your script. (15 marks)

Question 3

Evaluate the buy and sell dates due to breaches with the floor pric e. Report clearly, the buy and sell dates of tgt_stock in your script. (20 marks)

Question 4

Evaluate the buy and sell dates due to the breaches with the ceiling price. Report clearly, the buy and sell dates of tgt_stock in your script. (15 marks)

Question 5

Evaluate the financial return from the multiple pairs of transactions in Questions 3 and 4. Hence, report clearly, the final wealth of the strategy, corrected to 2 decimal points in your script. (15 marks)

Question 6

Recreate Figure 1 with the strategy inputs given in Figure 2. (10 marks)

Question 7

• Clear documentation. Suitable use of inline comments and markdown is strongl y recommended, especially if you intend to provide a long description for your code.

• Code management. Any code that is not required should be deleted and not commented out.

• Programming to specifications. You are required to document and explain clearly any assumptions you have made in your implementation. (15 marks)

----- END OF ECA PAPER -----

Get in Touch with Our Experts

QQ
WeChat
Whatsapp
SUSS代写,Singapore University of Social Sciences代写,Python代写,SUSS代编,Singapore University of Social Sciences代编,Python代编,SUSS代考,Singapore University of Social Sciences代考,Python代考,SUSShelp,Singapore University of Social Scienceshelp,Pythonhelp,SUSS作业代写,Singapore University of Social Sciences作业代写,Python作业代写,SUSS编程代写,Singapore University of Social Sciences编程代写,Python编程代写,SUSSprogramming help,Singapore University of Social Sciencesprogramming help,Pythonprogramming help,SUSSassignment help,Singapore University of Social Sciencesassignment help,Pythonassignment help,SUSSsolution,Singapore University of Social Sciencessolution,Pythonsolution,