2008年12月3日水曜日

Power Law:(27)STOCK,TSE,Foods,200811xx

(2008/12/15)
終値に誤り発見!Power Law:(33)を参照。再トライ,TODO)
Mistakes to the closing share price!Refer to Power Law:(33). Re-trial and TODO)

http://humanbeing-etcman.blogspot.com/2008/12/power-law33stocklast-price-incorrect.html

(2008/11/23-2008/11/27)

新聞の株式欄を見る。
東証第1部の食品関係の会社で、終値のべき乗傾向の推移をチェックする。

期間:2008/11/07, 2008/11/14, 2008/11/17 ~ 2008/11/21

The stocks column of the newspaper is seen.
The transition of the Power Law tendency to Last price is checked in the company related to the food of first section of the Tokyo Stock Exchange.

Period: 2008/11/07, 2008/11/14, 2008/11/17 to 2008/11/21

データはサイトにありそうだが、とりあえず、Excelに打ち込んだ。
It input it to Excel though data seemed to be on the site.

データは以下を使用。
Data is used as follows.
http://humanbeing-etcman.blogspot.com/2008/12/stock4tsefoodslast-price200811xx.html

~~~
方法,Method)
[1]日単位で、終値の順位のべき乗傾向をチェックする。
:両対数グラフをExcelで作成する(y軸を終値にする。x軸を順位(降順)とする)。
[1]The Power Law tendency to the order of Last price is checked every day.
:Both logarithm graph is made by Excel. (y axis is made a last price.
x axis is assumed to be an order (descending order). )。

[2]一位から近似直線の最適値までの順位をべき乗範囲とする。
[2]The order from the 1st place to the optimal value of the approximation straight line is made the range of the Power Law.

[3]べき乗範囲でのA,B値を得る。
[3]A and B value in the range of the Power Law are obtained.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[20081107]
[1] 20081107,Company=order:1 to 70,ALL

LN(y) = -0.966*LN(x) + 9.6647, R^2=0.7947

---
[2] 20081107,Company=order:1 to xxx
R^2 is checked.

order:1 to 10 R^2=0.9576
order:1 to 20 R^2=0.9817
order:1 to 25 R^2=0.986
order:1 to 29 R^2=0.988
order:1 to 30 R^2=0.9885
order:1 to 31 R^2=0.9888
order:1 to 32 R^2=0.9891

order:1 to 33 R^2=0.9895 <--:best

order:1 to 34 R^2=0.9889
order:1 to 35 R^2=0.9883
order:1 to 40 R^2=0.9694
order:1 to 50 R^2=0.904
order:1 to 60 R^2=0.8634
order:1 to 70 R^2=0.7947

---
[3] 20081107,Company=order:1 to 33

LN(y) = -0.535*LN(x) + 8.7058 , R^2=0.9895

LN
(x, y)=(1, exp(8.7058)),(33, exp(-0.535*LN(33) + 8.7058))
=(1, 6037.83),(33, 929.98)
Relative value)
=(1, 6037.83/929.98),(33, 1)
=(1, 6.492),(33, 1)
A=-0.535
B=6.492

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[20081114]
[1] 20081114,Company=order:1 to 70,ALL

LN(y) = -0.9646*LN(x) + 9.6387 , R^2=0.7874

---
[2] 20081114,Company=order:1 to xxx
R^2 is checked.

order:1 to 10 R^2=0.953
order:1 to 20 R^2=0.9797
order:1 to 25 R^2=0.9846
order:1 to 29 R^2=0.9871
order:1 to 30 R^2=0.9876
order:1 to 31 R^2=0.9881
order:1 to 32 R^2=0.9885

order:1 to 33 R^2=0.9887 <--:best

order:1 to 34 R^2=0.9883
order:1 to 35 R^2=0.9878
order:1 to 40 R^2=0.9718
order:1 to 50 R^2=0.906
order:1 to 60 R^2=0.8607
order:1 to 70 R^2=0.7874

---
[3] 20081114,Company=order:1 to 33

LN(y) = -0.5296*LN(x) + 8.6693 , R^2=0.9887

LN
(x, y)=(1, exp(8.6693)),(33, exp(-0.5296*LN(33) + 8.6693))
=(1, 5821.42),(33, 913.74)
Relative value)
=(1, 5821.42/913.74),(33, 1)
=(1, 6.371),(33, 1)
A=-0.5296
B=6.371

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[20081117]
[1] 20081117,Company=order:1 to 70,ALL

LN(y) = -0.9639*LN(x) + 9.6413 , R^2=0.7872

---
[2] 20081117,Company=order:1 to xxx
R^2 is checked.

order:1 to 10 R^2=0.9677
order:1 to 20 R^2=0.9852
order:1 to 25 R^2=0.9885
order:1 to 29 R^2=0.9904
order:1 to 30 R^2=0.9908
order:1 to 31 R^2=0.9911
order:1 to 32 R^2=0.9914

order:1 to 33 R^2=0.9915 <--:best

order:1 to 34 R^2=0.9912
order:1 to 35 R^2=0.9909
order:1 to 36 R^2=0.9888
order:1 to 40 R^2=0.9755
order:1 to 50 R^2=0.9098
order:1 to 60 R^2=0.8624
order:1 to 70 R^2=0.7872

---
[3] 20081117,Company=order:1 to 33

LN(y) = -0.53*LN(x) + 8.6739, R^2=0.9915

LN
(x, y)=(1, exp(8.6739)),(33, exp(-0.53*LN(33) + 8.6739))
=(1, 5848.26),(33, 916.67)
Relative value)
=(1, 5848.26/916.67),(33, 1)
=(1, 6.38),(33, 1)
A=-0.53
B=6.38

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[20081118]
[1] 20081118,Company=order:1 to 70,ALL

LN(y) = -0.9638*LN(x) + 9.641 , R^2=0.7844

---
[2] 20081118,Company=order:1 to xxx
R^2 is checked.

order:1 to 10 R^2=0.9698
order:1 to 20 R^2=0.9829
order:1 to 28 R^2=0.9884
order:1 to 29 R^2=0.9888
order:1 to 30 R^2=0.9892
order:1 to 31 R^2=0.9897

order:1 to 32 R^2=0.99 <--:best

order:1 to 33 R^2=0.9899
order:1 to 34 R^2=0.9896
order:1 to 35 R^2=0.9895
order:1 to 36 R^2=0.9873
order:1 to 37 R^2=0.9858
order:1 to 40 R^2=0.9741
order:1 to 50 R^2=0.9094
order:1 to 60 R^2=0.8617
order:1 to 70 R^2=0.7844

---
[3] 20081118,Company=order:1 to 32

LN(y) = -0.525*LN(x) + 8.6634 , R^2=0.99

LN
(x, y)=(1, exp(8.6634)),(32, exp(-0.525*LN(32) + 8.6634))
=(1, 5787.18),(32, 938.13)
Relative value)
=(1, 5787.18/938.13),(32, 1)
=(1, 6.169),(32, 1)
A=-0.525
B=6.169

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[20081119]
[1] 20081119,Company=order:1 to 70,ALL

LN(y) = -0.965*LN(x) + 9.6474 , R^2=0.782

---
[2] 20081119,Company=order:1 to xxx
R^2 is checked.

order:1 to 10 R^2=0.9734
order:1 to 20 R^2=0.9805
order:1 to 30 R^2=0.9882
order:1 to 31 R^2=0.9887

order:1 to 32 R^2=0.9891 <--:best

order:1 to 33 R^2=0.9887
order:1 to 34 R^2=0.9885
order:1 to 35 R^2=0.9886
order:1 to 36 R^2=0.9866
order:1 to 37 R^2=0.9854
order:1 to 40 R^2=0.9746
order:1 to 45 R^2=0.9365
order:1 to 50 R^2=0.9089
order:1 to 60 R^2=0.8598
order:1 to 70 R^2=0.782

---
[3] 20081119,Company=order:1 to 32

LN(y) = -0.524*LN(x) + 8.664 , R^2=0.9891

LN
(x, y)=(1, exp(8.664)),(32, exp(-0.524*LN(32) + 8.664))
=(1, 5790.65),(32, 941.95)
Relative value)
=(1, 5790.65/941.95),(32, 1)
=(1, 6.148),(32, 1)
A=-0.524
B=6.148

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[20081120]
[1] 20081120,Company=order:1 to 70,ALL

LN(y) = -0.9729*LN(x) + 9.6451 , R^2=0.7824

---
[2] 20081120,Company=order:1 to xxx
R^2 is checked.

order:1 to 10 R^2=0.9726
order:1 to 20 R^2=0.9799
order:1 to 25 R^2=0.9847
order:1 to 29 R^2=0.9872
order:1 to 30 R^2=0.9877
order:1 to 31 R^2=0.9882
order:1 to 32 R^2=0.9885
order:1 to 33 R^2=0.9884
order:1 to 34 R^2=0.9884

order:1 to 35 R^2=0.9886 <--:best

order:1 to 36 R^2=0.9874
order:1 to 37 R^2=0.986
order:1 to 38 R^2=0.9847
order:1 to 40 R^2=0.9758
order:1 to 50 R^2=0.9037
order:1 to 60 R^2=0.8618
order:1 to 70 R^2=0.7824

---
[3] 20081120,Company=order:1 to 35

LN(y) = -0.537*LN(x) + 8.6704 , R^2=0.9886

LN
(x, y)=(1, exp(8.6704)),(35, exp(-0.537*LN(35) + 8.6704))
=(1, 5827.83),(35, 863.66)
Relative value)
=(1, 5827.83/863.66),(35, 1)
=(1, 6.748),(35, 1)
A=-0.537
B=6.748

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[20081121]
[1] 20081121,Company=order:1 to 70,ALL

LN(y) = -0.9776*LN(x) + 9.6639 , R^2=0.7845

---
[2] 20081121,Company=order:1 to xxx
R^2 is checked.

order:1 to 10 R^2=0.9575
order:1 to 20 R^2=0.9686
order:1 to 30 R^2=0.9809
order:1 to 33 R^2=0.9825
order:1 to 34 R^2=0.9829

order:1 to 35 R^2=0.9832 <--:best

order:1 to 36 R^2=0.9824
order:1 to 37 R^2=0.9818
order:1 to 40 R^2=0.9729
order:1 to 45 R^2=0.9299
order:1 to 50 R^2=0.9
order:1 to 60 R^2=0.8625
order:1 to 70 R^2=0.7845

---
[3] 20081121,Company=order:1 to 35

LN(y) = -0.5426*LN(x) + 8.6911 , R^2=0.9832

LN
(x, y)=(1, exp(8.6911)),(35, exp(-0.5426*LN(35) + 8.6911))
=(1, 5949.72),(35, 864.34)
Relative value)
=(1, 5949.72/864.34),(35, 1)
=(1, 6.884),(35, 1)
A=-0.5426
B=6.884

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
A-Bをグラフに出力。
A-B is output to the graph.

---
ファイル:powerlaw-xx-a-b.txt を使用。The file: Powerlaw-xx-a-b.txt is used.
===
A,B,date,order,lab_disp
-0.535,6.492,20081107,33,right
-0.5296,6.371,20081114,33,left
-0.53,6.38,20081117,33,right
-0.525,6.169,20081118,32,right
-0.524,6.148,20081119,32,left
-0.537,6.748,20081120,35,right
-0.5426,6.884,20081121,35,right
===

---
Rのコードは以下。The code of R is the following.

data_ab = read.csv("powerlaw-xx-a-b.txt");

plot(log(abs(data_ab$A[0])), log(data_ab$B[0]), xlab="log(abs(a))", ylab="log(b)", xlim=c(-0.7, -0.5), ylim=c(1.6, 2.2),
col="orange", pch=20, main="Scatter chart:a-b, Power Law(xx),Foods")
par(new=T)
#
for (i in 1:length(data_ab$A)){
plot(log(abs(data_ab$A[i])), log(data_ab$B[i]), xlim=c(-0.7, -0.5), ylim=c(1.6, 2.2), ann=F)

if (data_ab$lab_disp[i] == "right"){
text(log(abs(data_ab$A[i])), log(data_ab$B[i]), data_ab$date[i], cex=0.75, pos=4, offset=0.5)
}
else if (data_ab$lab_disp[i] == "left"){
text(log(abs(data_ab$A[i])), log(data_ab$B[i]), data_ab$date[i], cex=0.75, pos=2, offset=0.5)
}
else{
text(log(abs(data_ab$A[i])), log(data_ab$B[i]), data_ab$date[i], cex=0.75, pos=4, offset=0.5)
}
par(new=T)
}

abline(v = log(0.6), col="red")

abline(log(144), 5, col="gray", lty=2)


~~~
図から傾き=5以外の可能性がありそうだ。
There seem to be possibilities other than inclination =5 from figure.

ライン:a2,a3,a4,a5 の式を求めてみる。
The line: The expression of a2, a3, a4, and a5 is obtained.

y = ax + b
a = (y2 - y1)/(x2 - x1)
b = y1 - ax1

---
(line:a2)

a = (2.13 - 1.63)/(-0.55 + 0.7) = 3.33
b = 1.63 - 3.33*(-0.7) = 3.961

y = 3.33 * x + 3.961
y = 3.33 * x + LN(52.51)

---
(line:a3)

a = (2.15 - 1.755)/(-0.5 + 0.7) = 1.975
b = 1.755 - 1.975*(-0.7) = 3.1375

y = 1.975 * x + 3.1375
y = 1.975 * x + LN(23.046)

---
(line:a4)

a = (2.12 - 1.725)/(-0.5 + 0.7) = 1.975
b = 1.725 - 1.975*(-0.7) = 3.1075

y = 1.975 * x + 3.1075
y = 1.975 * x + LN(22.365)

---
(line:a5)
a = (2.11 - 1.713)/(-0.5 + 0.7) = 1.985
b = 1.713 - 1.985*(-0.7) = 3.1025

y = 1.985 * x + 3.1025
y = 1.985 * x + LN(22.2535)

~~~
ライン(a2,a3,a4,a5) をablineで表現すると以下になる。
When line (a2,a3,a4,a5) is expressed with abline, it becomes it as follows.

#line:a2, y = 3.33 * x + LN(52.51)
abline(log(52.51), 3.33, col="gray", lty=2)

#line:a3, y = 1.975 * x + LN(23.046)
abline(log(23.046), 1.975, col="gray", lty=2)

#line:a4, y = 1.975 * x + LN(22.365)
abline(log(22.365), 1.975, col="gray", lty=2)

#line:a5, y = 1.985 * x + LN(22.2535)
abline(log(22.2535), 1.985, col="gray", lty=2)

~~~
[図への考察,Consideration to figure]
FnまたはLnへに収束することで安定化する。
市場規模が拡大することで安定する。B値がアップ。
It stabilizes by settling Fn or Ln.
The market scale expands and it stabilizes. B value improves.
~~~
end



0 件のコメント: