Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The pandemic, geo-political instability, and rising inflation have had a significant effect on the price of gold in recent years. The file ce4_Gold. csv contains

image text in transcribed

The pandemic, geo-political instability, and rising inflation have had a significant effect on the price of gold in recent years. The file ce4_Gold. csv contains data on the daily price of one Troy ounce of gold for the last ten years. Load its content into a DataFrame called gold . Choose the appropriate index for this DataFrame and parse the date variable (as a datetime object). gold = pd.read_csv("ce4_gold.csv", index_col="date", parse_dates=["date" ]) gold. head( ) To test whether a simple momentum strategy would work in the gold market add a new column to gold called signal equal to +1 if the change of the gold price over the previous 126 days is posive and -1 otherwise. At the end of the calculation gold should only have these two columns. (Point 1 Mark). The pandemic, geo-political instability, and rising inflation have had a significant effect on the price of gold in recent years. The file ce4_Gold. csv contains data on the daily price of one Troy ounce of gold for the last ten years. Load its content into a DataFrame called gold . Choose the appropriate index for this DataFrame and parse the date variable (as a datetime object). gold = pd.read_csv("ce4_gold.csv", index_col="date", parse_dates=["date" ]) gold. head( ) To test whether a simple momentum strategy would work in the gold market add a new column to gold called signal equal to +1 if the change of the gold price over the previous 126 days is posive and -1 otherwise. At the end of the calculation gold should only have these two columns. (Point 1 Mark)

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

Project Financing Analyzing And Structuring Projects

Authors: Frank J Fabozzi, Carmel De Nahlik

1st Edition

9811232393, 9789811232398

More Books

Students also viewed these Finance questions

Question

Explain the need for remedial basic skills training programs

Answered: 1 week ago

Question

Describe a typical interpersonal skills training program

Answered: 1 week ago