You are tasked with developing an optimized software program that simulates and predicts interest rates based on historical data obtained from a reliable API. The program should fetch interest rate information from the API starting from the year 1980. Using this data, it should then simulate and predict interest rates for the next two years. The program should be able to visually represent the historical and predicted interest rates through an appealing graphical plot. The API will be in Good. Another thing we should think about is that it can reed the correct format from the api. Nytt JSON-format (Onsdag 25. november endrer vi JSON-formatet i Norges Banks API for åpne data. Dette vil påvirke alle API-forespørsler som ber om "sdmx-json" som svarformat. rotelementene omnevnes fra "header" og "datasets" til "meta" og "data.datasets". JSON (SDMX JSON) Remember this.
def get_json_format(): ## get the json format from the api. return jsonFormat def read_json_format(jsonFormat): ## read the json-format and process the data. return data def get_interest_rates(): jsonFormat = get_json_format() data = read_json_format(jsonFormat) return data def plot_interest_rates(): data = get_interest_rates() ## plot the data on a graph that will be returned return graph def predict_interest_rates(): data = get_interest_rates() ## predict interest rates and return the data return data def simulate_interest_rates(): data = predict_interest_rates() ## plot the data on a graph that will be returned return graph