Let caught up the EF data we save the last time and plays a bringing the F portfolio Package as well. If you do not have the EF data for any region, loaded the portfolio Package and try again. Are you ready to get started? I ought to just do the graph of position using the power functions to display the data as I want, load one comma one in the round bracket after c, it draws only one per page. Today, are you to the EF Data in the plot function? Later on in this time, it don't match your graph, but there would be a message asking you to choose one of the eight. Before making a choice. Let me briefly talk about what these options are. If you select one, you'll get the primary efficient frontier line. In the previous lecture, we already did the same. Once again. The efficient frontier line is the collection of efficient portfolios. The efficient portfolios are portfolios with the greatest return under a given risk. The number two, it's the minimum risk portfolio. It's a portfolio with minimum volatility. It shows that the portfolio with their list of volatility among the most efficient portfolios. Try it, then the red dot will be on the graph. The number three is a tangency portfolio. Shall we run it before I explain it? The efficient to all minimum variance portfolio we made in this lecture, our portfolio with or near risky asset, but when you invest, you sometimes decided to create a portfolio by dividing asset or location among risky asset, just like we did, but sometimes we must decide how to allocate between risky asset and the risk-free asset. If you invest in 90 percent for risk asset and 10 percent for risk-free asset, you might get a higher return than the case of over 80 percent in risk asset and 20 percent in risk-free asset, but the risks is also higher. The line you see in this graph is when there are tremendous combinations of returns and risks from various combination of risky asset and risk-free asset. The graph of a risky and risk-free asset allocation can have a tangent point with the graph of efficient portfolio, and the tangent point each of portfolio of risky asset with the best duration of a volatility to return when considering a combination of risk-free and risky assets. If you enter four, each of the risky asset display on the efficient frontier, or SSI below the efficient portfolio line is suggested that if you create an efficient portfolio, you can always get a much better return than investing in a single asset under a given risk. If you enter five, shows that their portfolio with equal allocation, since there were seven global ETF, so either other with cases that we invested one over seven in each ETF. Detail marked with blue squares. Now there is so much information on the graph, it gets difficult to recognize anything. I'm doing this one-by-one to explain it to you, but you should choose and use the graph you need. Entry checks displays the efficient portfolio with only two assets under the condition that show selling is not possible. In our case with the seven asset, you would have a total of 21 lines, entering seven displays a portfolio created by Monte-Carlo simulation. The Monte-Carlo simulation depicts the process of a randomly generating the return of SF. Afterwards, the research shows that the likelihood of a portfolio return and risk, the portfolio frontier function defaulted to 5000 simulations. The result over Monte-Carlo simulation give us a rough of idea of what the possibilities are. Of course, you need to analyze extreme cases separately. The other choice at the portfolio with the highest Sharpe ratio among the efficient portfolio. Let's draw an efficient portfolio line they don't need the best Sharpe Ratio portfolio and seven asset. Now once you see the selection presses zero to get out of this function. Then now let's draw the graph once again to make a new plot, let you to the function plus the new. We use the same comment as we did. First, select one to run, then four, and finally eight it is a useful graph of it, meaningful information. Now, let us copy this graph and paste it into your report. Go to the plot and click export and select Copy to Clipboard then window will pop up. You can adjust the graph side using the width and height. I just use it as it. There are two options, modify and the map. I chose modify, then click copy plot then window it plot. Now let's open the Word documented to write your report. Here control V, we attached the graph. You can create a document in our script. If you do that, the document will be in our working directory, but if you specify a different folder, you can have it directly there. The location of the further can be written in quotation mark when creating the file. Let us try. First, I go to files and create a further report in our working directory, and to create a file in it, are added a past to the name of the file I'm writing. You can just copy it, but I write it again. Write the pdf function above the graph of comment you just create it and write the name you want to save inbound bracket. At the end of the graph of comment, write the function tap that off and blank around the bracket. The function thereof closes the device using the PDF. Before this, the PDF is open, you will probably use a function thereof, in other places too. Since it is only in our working directory, you write a dot, then a folder name, and a file name. Let's check it, if we check files on the bottom right side in our studio, you can see the files degenerated. I gave you the example of creating a PDF file. That you can create a JPE divider, then you can save it as your photo file. Now that we talked about pdf of files, we're also talk over SF files style you're often use, I haven't talked about SF files so far because we have to talk of a package first. You need to download the package to read except files in R. Let's download and install the package read access with the install the package function. This time, we didn't go through the process of checking. We already have this package. Specify the SF files the location and the name you want to read in the red underscore accessor function. I will save the file. I just the imported at SP 500 than monthly. Shall we check it? I hope you save the script that you learned today.