How to plot a series of returns, and how to comapre two different Sharpe ratio on the same graphs

1 回表示 (過去 30 日間)
I have to use graphs and charts on Matlab (I'm actually using the R2019a version) to plot a series of returns and to compare two bar-charts about Sharpe ratio but in any case, it doesn't appear what I want to draw. It's a possible system problem or maybe something related to Matlab's settings? The program doesn't report any error so I could not understand what's happening.
  2 件のコメント
Dinesh Yadav
Dinesh Yadav 2020 年 1 月 21 日
How do you want to draw it? I am attaching an image of bar plot comparision. Is this how you want to draw your bar chart?
Annamaria Parola
Annamaria Parola 2020 年 1 月 22 日
Exactly as you have shown in the picture, instead of for series of returns I need to use a simple plot but in both cases it doesn't display any figure.

サインインしてコメントする。

回答 (1 件)

Dinesh Yadav
Dinesh Yadav 2020 年 1 月 22 日
Hi, I am not sure what you mean by "instead of for series of returns".
How I understand it is lets say there are two series data y1 and y2. I am assuming both to be row vectors of dimension . Create a matrix y such that it has y1 and y2 as its columns.
y = [y1' y2'];
Now plot it using bar command
bar(d,'FaceColour','Flat');
  1 件のコメント
Annamaria Parola
Annamaria Parola 2020 年 1 月 25 日
This is the default message return to Matlab:
Error using matlab.graphics.chart.primitive.Bar
There is no Facecolour property on the Bar class.
It's probabile that the Facecolour property is not compatible with bar graph

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeBar Plots についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by