大家好,
描述股票價格走勢的數據是由開盤/收盤價和最高/最低價創建的。 有沒有辦法在JMP中以開盤價和收盤價創建具有真實實體的箱形圖(燭台圖),並分別以最大(高)和最小(低)價來創建上下陰影,如所附圖片所示,還是存在更好的方法嗎? 傳統的箱形圖但是,元素顯示離群或分位數盒圖,並提供值分佈的緊湊視圖。 我附上了一個示例數據表,其中提供了幾個時間戳和價格值(最小,打開,關閉和最高)。 對於提示和建議,我將不勝感激。

(來源:維基百科)
最好的祝福
我認為這是JMP無需編寫腳本就能做到的最好

但是,只要花一點力氣,就可以輕鬆地編寫一些JSL來創建燭台圖。
是的,正如Jim所指出的,Graph Builder可以輕鬆做到這一點。 但是,隨著獲得更多數據,您可能需要考慮IR(各個移動範圍圖),因為這些信息可以幫助您了解指標隨時間推移的一致性/穩定性。
我有更多時間研究這個問題,我認為下面的簡單解決方案可能對您來說是一個可行的解決方案。

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Stock Prices.jmp" );
dt:open << label;
dt:close << label;
gb = dt << Graph Builder(
Size( 1289, 456 ),
Show Control Panel( 0 ),
Variables( X( :Date ), Y( :High ), Y( :Low, Position( 1 ) ) ),
Elements( Bar( X, Y( 1 ), Y( 2 ), Legend( 10 ), Bar Style( "Interval" ) ) ),
SendToReport(
Dispatch(
{},
"Date",
ScaleBox,
{ Interval( "Day" ), Inc( 1 ),
Minor Ticks( 0 )}
),
Dispatch(
{},
"400",
ScaleBox,
{Legend Model(
10,
Properties( 0, {Line Width( 2 )}, Item ID( "High..Low", 1 ) )
)}
)
)
);
// Add the boxes to the chart
Report( gb )[framebox( 1 )] << add graphics script(
halfDayincr = In Days( 1 ) / 2 * .8;
days = (Col Max( :Date ) - Col Min( :Date )) / In Days( 1 );
Pen Color( black );
Pen Size( 2 );
For( i = 1, i <= N Rows( dt ), i++,
If( :Open[i] <= :close[i],
Fill Color( light green );
,
Fill Color( light red );
);
Rect( :date[i] - halfDayincr, Max( :open[i], :close[i] ), :date[i] + halfDayincr, Min( :open[i], :close[i] ), 1 );
Rect( :date[i] - halfDayincr, Max( :open[i], :close[i] ), :date[i] + halfDayincr, Min( :open[i], :close[i] ), 0 );
);
);