ラベル

AI Forecast 8306MUFG (335) Social (79) life (75) Financial (70) IT (62) Proposal (57) AI (52) idea (51) Fund Management (50) economics (44) Trading (43) Covid-19 (40) Hedge Fund (37) Risk (36) Culture (31) BOJ (29) Science (29) hobby (27) accounting (17) Apps (16) Travel (14) career (11) job (7) Hiking (5) emotion (5) music (3) Statarb (2) piano (2)

2019年11月13日水曜日

リアルフォン計画.シンプルなIP電話 Project Real Phone. Most Simple Phone

リアルフォン計画.シンプルなIP電話
English follows




すべては実際、IP接続が出来た時点で終わっていた。 音声、画像、データは、IP接続の下ではすべて同じデータだ。

しかし、今まで実際の運用は種類別に行われた。 音声電話は従来型の課金システムに縛られ、 IP電話が急激に広まることはなかった。

現在、IP電話は、LINE、Skype、WeChat、などに分かれ統一感はまったくない。

ここで提案がある。

シンプルな、PtP IP接続を実現しよう。複雑なシステムはいらない。

その名前は「フォン」一言。 だれでも番号を持ち、お互いにIP電話で通話できる。 中央にリポジトリを持ち、PtPのIP接続のみをサポートする。

フォンにアカウントを持つには、パスポート、運転免許証などの認証を求める。またフォンは音声、映像、データ、など、すべてのサービスをPtPで実現する。これにより、アカウントを持つだけで、ユーザーはビデオ電話、会議、データ交換などが自由に行えるようになるのだ。

Project Real PHONE. Simple IP Phone



In reality, all setup has been done long time ago when IP connection has been established. Under IP connection, voice, video, data are all under same category, that is data.

However, up until now, the actual operation has been done by type of data. Voice connection was bound by existing charging system, hence IP phone did not expand rapidly.

At this point, IP phones are split into LINE, Skype, WeChat and there is no consistency.

Here is one proposal.

Let's establish simple IP connection environment. No need for complex system.

The name is PHONE, one word. All has own code and call each other by IP phone. Central repository supports PtP IP connection only.

PHONE requires the due diligence process by passport/driver's license submission. The PHONE realize voice, video, data service on PtP basis. Just by having account, users can enjoy video, conference, data exchange freely.




中学校の合唱 Junior High Chorus

中学校の合唱

Junior High Chorus



中学校の合唱で子供がピアノ伴奏の役をもらった。クラスメートをまとめて一つの合唱を仕上げていく過程は子供から聞いていても感動的だ。クラスは最初ばらばらで、非協力的な人(特に男子)も多くいる。中学校のコーラスは小学校よりパート分割などより本格的になり、上手に歌えるとかなり聞きごたえがある。最初まったく参加していなかった生徒が最後は大きな力となって最後の発表会で歌っているのを聴くと、チームをまとめてプロジェクトを完遂させることを学ぶ非常に良い教育機会だと思う。

My kid was assigned to piano accompaniment for junior high chorus. The process of development of class chorus is impressive as I hear from Kids. Initially team is disoriented and members are not really cooperative(especially boys). Junior high chorus has multiple layers of chorus part splits, and sounds much better than elementary school chorus if done well. Seeing the eventual serious involvement to the team by all including those who initially not were not cooperative but now creating really good sounds, I felt this is a very good educational opportunity to learn how to complete project combining team to achieve goal.


2019年10月29日火曜日

見えたものを声で教えるAI AI tells you what AI sees

見たものを声で教えるAI
AI tells you what AI sees



カメラに映ったものをAIが声でおしえてくれるよ。やってみよう!現在Win10のPCのみで動作。動作しない場合、ブラウザのハードウエアアクセラレーションをOFFにしてみてください。プログラムはこちら。  AI tells you what AI sees. Let's try! Now works on Win10 PC only. If does not work, pls try turning off browser hardware accelerationGitHub is here.

2019年10月26日土曜日

関数補間マシンとしてのAI実験  AI Experiment as a Function Interpolation Machine

関数補間マシンとしてのAI実験 

AI Experiment as a Function Interpolation Machine




ニューラルネットは補間関数と前に述べたが、下の自作ツールで試してみよう!Ealier I mentioned that neural net is an interpolation function so let's try it out now in below tool I made!

10個のデータポイントを色々変えると、関数が難しくなるにつれて、ニューロン数、繰り返し回数、中間層の数を増やさないと追従できなくなることが確認できる。If you change 10 data points, as the function becomes complex, you can see that interpolation becomes more difficult unless you increase number of neurons, epochs, layers.

活性化関数は全部で11ある。There are all 11 activation functions you can try (elu, hardsigmoid, linear, relu, relu6, selu, sigmoid, softmax, softplus, softsign, tanh).

枠内の数字を変えてボタンを押すと計算終了後に与えた関数および推定関数を表示する。計算速度は利用中のパソコンの性能によりかなり時間がかかる場合がある。If you change numbers in the boxes then click button, your input function set as well as its approximation are shown at the button graph. Calculation takes longer depending on the spec of your computer.

なお、本プログラムはJavascript版のTensorflowで書かれており、計算はあなたのマシンでローカルに実行している。プログラムはココ。For information, this program is written in Javascript version of Tensorflow and calculation is done on your machine locally. Program is here.


Neuralnet Capability Check on Javascript based Tensorflow
NumOfNeurons/layerニューロン数/層
NumOfEpoch教育繰り返し回数
InputLyrActivFunc入力層活性化関数
HidnLyrActivFunc中間層活性化関数
NumOfHiddenLayer中間層の数

Value of Y when X = 1, X=1の場合のYの値
Value of Y when X = 2, X=2の場合のYの値
Value of Y when X = 3, X=3の場合のYの値
Value of Y when X = 4, X=4の場合のYの値
Value of Y when X = 5, X=5の場合のYの値
Value of Y when X = 6, X=6の場合のYの値
Value of Y when X = 7, X=7の場合のYの値
Value of Y when X = 8, X=8の場合のYの値
Value of Y when X = 9, X=9の場合のYの値
Value of Y when X = 10, X=10の場合のYの値

2019年10月18日金曜日

日本の超安スマホ電話代は月額1,400円だ! Super Low Cost Smart Phone Bill in Japan is $13/Month !

日本の超安スマホ電話代は月額1,400円だ!

Super Low Cost Smart Phone Bill in Japan is $13/Month !



2019年10月現在の、日本の携帯電話超安セットは概略こうだ。月に3ギガまでインターネットが使え、電話も自由にできる。携帯電話代を節約したい人には、是非お薦めだ。Super Low Cost Cell Phone Bill profile in Japan as of Oct 2019.  Condition is 3GigaByte/M with internet and conversation. Highly recommended for those who wish to reduce phone bill in Japan.

データ接続SIM(3ギガ/月)を契約する。1,000円/月。初期費用3千円。Subscribe SIM for Data connection (3GigaByte/M). JPY1,000/Month with initial cost of JPY3,000.
SkypeIn番号を取得する。400円/月。 Purchase Skype In Number. JPY400/Month.

これで、初期投資1万3千円、月払い1,400円のインターネット+携帯電話環境が完成!This makes internet+phone setup with only initial investment of JPY13K(USD110), monthly payment JPY1.4K(USD12).
  • 利点 Advantage
    • コストが低い Cheap
    • SIMはNTTのため、接続エリアはDOCOMO並み Connection area equivalent to NTT
    • 他のIP電話(LINE上の音声会話など)も自在 Can use voice on other IP based framework such as LINE
    • 電話の発信もSkypeOutで容易にできる Can make call by the use of SkypeOut
  • 欠点 Downside
    • ある程度、問題処理ができることが必要。Need to cope with problems to some extent.
    • 中華アンドロイドは当たり外れがあるので、Amazonのレビュー欄などを注意深くチェック。冒険したくない人はヤフオクで中古のiPhoneを購入 Chinese Android's quality is not stable so need to check review and comments. If you prefer trouble free, better to purchase used iPhone at Yahoo Auction.
    • Skypeの利用のため、送受信時にワンクッションある Skye is not really responsible compared to regular voice phone
    • 安い中華スマートフォンは電池容量が少ない Cheap Chinese Smart Phone does not have big battery capacity.

2019年10月14日月曜日

歴史の振り子..米国で社会主義!?  History's Pendulum .. Socialism in USA!?

歴史の振り子。米国で社会主義!? 
History's Pendulum. Socialism in USA!? 


 米国で社会主義が勢力を増大しているという。Socialism looks in increasing trend in USA.

 先鋭化し過ぎた資本主義が、共産主義、社会主義を生み、腐敗の後に資本主義を取り入れ成功したと思っていたら、本家本元の資本主義もまた、修正を余儀なくされているようだ。トランプ現象、BREXITも資本主義に取り残された人々から生まれた民主的な革命だ。  Capitalism gone too extreme created communism and capitalism, that was later corrupted, then incorporated capitalism to be successful however, now, even the original capitalism looks requiring for further amendment to survive.

右に、左に、大きく振れた社会体制の振り子は、1周期の起点にまた戻りつつある。 しかしここで、米国が社会主義国家になってしまっては、人間は全く歴史から学んでいないことになる。 Pendulum of social frameworks swung big toward right and left, now looks swinging back to the starting point.  But if USA converts to socialism, then it means that human being did not learn anything from history.

資本主義の本尊である米国には是非大局的な視点から資本主義の建設的な修正をリードしてもらいたものだ。 所得の再配分を徹底化することが一つの答えだろう。具体的には、累進課税の強化とベーシックインカム、資産課税だろう。As a guru of capitalism, I wish USA will lead the constructive and holistic amendment of capitalism. Thorough enforcement of redistribution of income can be one answer.  In more concrete manner, it will be the enforcement of the progressive tax, basic income and tax on asset.


2019年10月13日日曜日

Javasctipt Canvasアプリをアプリをブログに挿入する二つの方法。Two ways to migrate JavaScript Canvas application to Blog


Javasctipt Canvasアプリをブログに入れる二つの方法。

Two ways to migrate JavaScript Canvas application to Blog



Javascriptは完成品のWebベースの展開が容易であることから、簡易なAIの開発については今後Tensorflow.jsが主流になるだろう。ここでは、ML5もしくはTensorflow.jsアプリをブログに掲載する場合の変更点を書いた。Tensorflow.js will be mainstream for light AI development going forward due to its product scalability through Web. Here I wrapped the points of changes when migrating the ML5 or Tensorflow.js application to blog.

Method1-ML5)
制御がML5にあり、CallBack スタイルなため、Parent関数を使って、Canvasが属しているdivを指定する Control is under ML5 due to call-back style, specify the div where Canvas belongs using Parent function.
Sample https://randomwalkjapan.blogspot.com/2019/10/mobilenetusing-mobilenet-inside-blogspot.html

div id="myContainer379"
MyCanvas=createCanvas(320, 240);
MyCanvas.parent('myContainer379');
video = createCapture(VIDEO);
video.parent('myContainer379')

Method2-Tensorflow.js)
制御が自分にあるため、appendChild関数を使って、Canvasをdivに帰属させる User has control, hence let Canvas belong to div using appendChild function.
Sample .. Pls implement below to any apps, then it will be part of your blog.

div id="mainContent1432"
var canvas = document.createElement("canvas");
var mydiv = document.getElementById("mainContent1432");
mydiv.appendChild(canvas);



2019年10月11日金曜日

YOLO(物体認識AI)で遊んでみよう Let's play on YOLO(AI Object Detector)

YOLO(物体認識AI)で遊んでみよう
 Let's play on YOLO (AI Object Detector)



YOLOは物体認識AIで、自動運転などでの報道でお馴染みだと思う。このページをパソコンで開けるだけで(カメラは必要だが)動く。コードはこちら現状ではWin10のChrome上、「ハードウエアアクセラレーション」はONで動作確認しています。

YOLO is an object detection AI that many may be familiar in news on auto-driving.  Just open up this page and you can run it(camera is necessary). Code is here. Note that this is confirmed to work on Win10 Chrome with hardware acceleration ON in browser setting.



2019年10月10日木曜日

子供の水いぼに、ヨクイニンのすすめ Yokuinin Recommendation for Kid's Water Warts

子供の水いぼに、ヨクイニンのすすめ

Yokuinin Recommendation for Kid's Water Warts



2年ほど前、小学生の子供がプールで水いぼにかかった。全身ではないけれど、よく見るとあちこちにある。皮膚科に行くと、液体水素を使ったピンセットでの除去を継続する通院を奨められた。こどもは嫌がった。ネット情報で知ったヨクイニンを代わりに3か月分もらった。結果、2か月で水いぼは完全に消滅。物理的な除去を決断する前に、ためらわず、親から医師に要求することをお勧めする。ちなみにヨクイニンハトムギのエキスで安価である。

2yrs ago, elementary school kid got inflicted by water warts. Not all over the body but I could see here and there if I looked close. Dermatology doctor recommended physical one by one removal by tweezers and liquid nitrogen. Kid hated it.  Instead, we got Yokuinin for 3 month that I learned as effective sometimes by net search. As a result, all the water warts were gone in 2 month.  I recommend not to hesitate to request doctor for Yokuinin before going for physical removal.  For information, Yokuinin is an essence of Pearl barley that is less expensive.


2019年10月8日火曜日

Webアプリから実行環境情報取得 PC Info retrieval from Web application


Webアプリからの実行環境情報取得

PC Info retrieval from Web application





Web上で走るプログラム(JavaScript)側から、実行環境を調べる必要が出てくる。例えばビデオ入力。カメラの位置(表か裏か)を知るため、実行環境がPCか、スマートフォン/タブレットかを知る必要がある。Sometimes we need to find out local machine information from web application(JavaScript). Video input is one example. Program needs to know if local machine is PC or smart phone/tablet to find out hardware location of Cameras(front/rear).

因みに、次のリスト(Computer Information)は、今このブログが実行されている端末の情報である。For reference, below list(Computer Information) shows local machine information where current blog is running on.

            document.writeln(navigator.platform)
            document.writeln(navigator.appVersion)
            document.writeln(navigator.oscpu)
            document.writeln(navigator.navigator)
            document.writeln(navigator.platform.indexOf("Linux"))
            document.writeln(navigator.platform.indexOf("iPhone"))
            document.writeln(navigator.platform.indexOf("iPad"))



Android、iPad、PCについて上記の情報をチェックした結果、Android端末を検出するにはnavigator.platformに文字Linux、iPhoneは文字iPhone、iPadは文字iPadがあるかないかで判定できるであろうことが推測できた。下は、これらの情報を用いた利用例である。I checked the above information for Android, iPad, iPhone and found out that characters Linux, iPhone, iPad can be used to detect Android, iPhone, iPad respectively retrieving from navigator.platform. Below is one example.

    if(navigator.platform.indexOf("Linux")!=-1 || navigator.platform.indexOf("iPhone")!=-1 || navigator.platform.indexOf("iPad")!=-1) {
      video = createCapture({audio:falsevideo:{facingMode:{exact:"environment"}}}); }
      else {video = createCapture(VIDEO);}


ここで「できるであろう」と書いたのは、Androidなのに、文字Androidが入っている場合とない場合があるようで、確固とした業界基準がないように見受けられたからだ。I wrote "can be" since I see a case where there is no character 'Android' even though machine is definitely Android, hence it looks there is no clear standard.

2019年10月5日土曜日

ブログスポットの中でのMobileNet利用 Using MobileNet inside BlogSpot

ブログスポットの中でのMobileNet利用
Using MobileNet inside BlogSpot



Googleが運営する無料ブログサービスであるブログスポット(このサイト)に、カメラに映った映像を分類するMobileNetという実験プログラムを組み込んでみた。既に学習済みのネットを利用するだけで、学習は行わない。映し出された窓にはカメラの映像が、その下に画像判定結果とその可能性(0から1の範囲)が示される。ライオンやシマウマなど簡単なもので試してください。動作しない場合、ハードウエアアクセラレーションをOFFにしてみてください。計算負荷が大きいため処理が遅くなります。実行したくない人はカメラアクセス要求を拒否してください。

Installed MobileNet on this site, blogspot, i.e., Google's free blog service. This only classifies object based on pre-educated neural net but no new learning is done.  Under the camera video shown, object name and possibilities(0-1) are shown.  Pls try out for simple objects such as lion or zebra.  If does not work, pls try turning off hardware acceleration. Due to heavy computation, reactions will be slow. Pls deny camera access request if you do not wish to run. 

なお、BlogSpotの記事の場所に結果を表示するには、下のようにparentメソッドを利用します。ソース全体(GitHub)はこちら。 To display the result on blog body, use parent method as below. Complete Source is here(GitHub).

body
  div id='myContainer'/div
body

                 --- Skipped so pls see GitHub for complete source --

script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.8.0/p5.min.js" /script>

  function setup() {
    // Create a camera input
    video = createCapture(VIDEO);
    video.parent('myContainer')
    video.size(200,300)
    // Initialize the Image Classifier method with MobileNet and the video as the second argument
    classifier = ml5.imageClassifier('MobileNet'videomodelReady);
    resultsP = createP('Loading model and video...');
    resultsP.parent('myContainer')
  }

                --- Skipped so pls see GitHub for complete source --

  // When we get a result
  function gotResult(errresults) {
    // The results are in an array ordered by confidence.
    resultsP.html(results[0].label + ' ' + nf(results[0].confidence02));
    resultsP.parent('myContainer')
    classifyVideo();
  }
 /script
..Code shown from simple Cut and Pasted from Visual Studio Code
(pls delete, "white-space: pre;" after cut and paste. also pls correct for bracket for script and body since brackets are deleted to make output looks nicer :)

2019年9月24日火曜日

5分で分かる為替先物  5min Understanding of FX Future

5分で分かる為替先物

5min Understanding of FX Future


ドル円の為替レートが未来に向かって円高になる(ドルの金利>円の金利の場合)ことを説明するのに、次のように説明すると分かってもらえることが多い。I generally got good feedback from people, when I explained people as below why future FX rate on JPY against USD appreciates although JPY interest rate is lower than USD interest rate mostly.

  1. ある日100円を持っている人と、1ドルを持っている人が出会い、円とドルを交換した(これで、ドル円為替レートは100円となった)。お互い、お金は1年定期で預金した。One day, a person with 100JPY and 1USD met and exchanged them(then JPYUSD FX rate become 100JPY/USD ). Both side made 1yr term deposit the proceeds. 
  2. 円とドルを交換したのと同時に、二人は1年後に交換したドル円を再び、定期預金の金利分もそっくりそのまま交換する約束をした。Same time as exchange, both promised to exchange whole back again including the interest earned. 
  3. 円の市場金利は、0.1%、ドルの市場金利は2%だったとすると、1年後、100円は100.1円に、ドルは1.02ドルに増える。Assuming JPY 1yr market interest rate is 0.1% while USD 1yr market interest rate is 2%, after 1yr, JPY100 becomes 100.1JPY and USD becomes 1.02USD. 
  4. 結果、1年後に二人は100.1円を1.02ドルと交換することになる。これは1年後決済のドル円為替レートが100.1/1.02=98.14となっていることを表している。As a result, after 1yr, they exchange 100.1JPY by 1.02USD. This means that JPYUSD settlement FX rate after 1yr became 100.1/1.02=98.14. 
式で説明すると、Using equation,
\begin{align} Current FX Rate(CFXR)  &:  100(JPY/USD)為替現在値  \\r_{JPY}   &:  JPY's1yr Interest Rate(円1年金利)  \\ r_{USD}  &:  USD's1yr Interest Rate(ドル1年金利) \end{align}
とすると、現時点で値付けされる、1年後に決済する場合の為替レートは、If we assume above, then, the current FX 1yr forward settlement rate priced as of now will be,
\begin{align}  Future FX Rate &= \frac{100JPY's1Yr future Value(100円の1年後の価値)}{1USD's1Yr future Value(1ドルの1年後の価値)} \\ &= \frac{100 \times ( 1 + r_{JPY} )}{1 \times ( 1 + r_{USD} )}  \end{align}
となる。

一般化して、現時点で値付けされる、T年後に決済する場合の為替レートは、Generalizing, current future settled FX rate after T years will be,

\begin{align} rT_{JPY}   &:  JPY'sTyr Interest Rate(円T年金利)  \\ rT_{USD}  &:  USD'sTyr Interest Rate(ドルT年金利) \end{align}
\begin{align}  Future FX Rate &= \frac{CFXRJPY'sTYr future Value(CFXR円のT年後の価値)}{1USD'sTYr future Value(1ドルのT年後の価値)} \\ &= \frac{CFXR \times ( 1 + rT_{JPY} )^T}{1 \times ( 1 + rT_{USD} )^T}  \\ &= CFXR\times e^{(rT_{JPY}-rT_{USD})}    \end{align}
となる。

CurrentJPYUSDRateドル円現在レート(Ex.100)
(%)JPY1YrInterestRate(%)円1年金利(Ex.0.1)
(%)USD1YrInterestRate(%)ドル1年金利(Ex.2)
YearToMaturity満期までの年数(Ex.1)

 USDJPYFutureFXRate(%)ドル円先日レート(%)


2019年9月15日日曜日

Win10 最強のエディター Best Editor on Win10

Win10 最強のエディター

Best Editor on Win10





Windows 10でプログラミングをする際に、使いやすい無料エディターを探していて、今日、見つかった。Visual Studio Codeだ。まだ、JavaScriptにしか使っていないけれど、軽くて、Indentation、ハイライトも充実。そして無料。使わない手はない!


Looking for free handy editor for programming on Windows 10 and found Visual Studio Code today. So far, used only for JavaScript but it is light with indentation and highlights. And Free. Why not using it!


2019年9月14日土曜日

地球CTプロジェクト Earth CT Project

地球CTプロジェクト

English Follows


  ニュートリノが原子を通り抜け、私たちの体の中をニュートリノの風が吹いていることは既に分かっている。ニュートリノから見ると、地球上のすべての物体は隙間だらけだ。今、加速器を地上に作っている段階だが、地球周回軌道上に発信機、受信機を建設することで、地球全体をCTすることが可能となる。地球はついに丸裸になる。

  実現すると、たとえば、次のようなことが可能となる。
  • 地球の全資源の所在が明らかになる。
  • プレートの動きのリアルタイムの観察により、噴火、地震予知が可能になる。
人類にとって膨大なメリットがあるため、国際プロジェクトとして是非取り上げて欲しいものだ。知的生命体人類としては、自分の住んでいる星についてぐらい知っていてあたりまえだろう。考えてみると、人類は現在、地表近くを行ったり来たりしているだけなのだ。



Earth CT Project


We know that neutrinos go through atom, hence, in a sense, "neutrinos wind" is blowing through our body. From neutrinos, all substance on earth are sparse with voids everywhere. Now accelerators are build on earth, but if we build emitter and receiver on earth orbit, we can perform CT on earth.  Earth will be naked finally then. 

If realized, followings will be possible for example. 
  • All earth resources will be revealed.
  • Volcano eruption and earthquake prediction will be possible through real time observation of plate movement.

Due to its tremendous advantage to human being, I wish this will be taken up as an international project.  As an intelligent creature on earth, homo sapience, we are responsible to know where we live at least.  In another look, currently, human being is just going back and forth near surface on earth. 




2019年9月11日水曜日

銀行の収益源 Income Source of Bank   

銀行の収益源

English Follows



銀行って何をしているんだろう? 

普通の人にとって、銀行はキャッシュカードでしかない。

分かっているようで分かっていない、収益構造はこうだ。

長短ギャッピング : 金利の安い短期で資金を借りて、金利の高い長期で貸し出すことで、長期金利ー短期金利の差分を得る。長期金利>短期金利であることが必要。金利差が縮小すると利益が減り、逆転すると損失となる。
(例)100億円を10年間、年率3%で貸し出す。貸出資金は1か月ごとに変動金利(例えば年率1%)で借り続ける。年間2億円(金利差2%)が収益となる。

信用リスク取り: 倒産リスクがある主体に信用リスクを上乗せした金利で貸し出す。上乗せ金利分が収益となる。リスクは貸出先の倒産である。
(例)A社に100億円を10年間、年率5%で貸し出す。倒産リスクがない場合の金利は3%である。

預金:金利の安い預金で調達した資金で、金利の高い定期貸出を行い、金利の差額を収益とする。
(例)100億円を当座預金(金利ゼロ)または普通預金(金利年率0.1%)で調達し、10年間、年率3%で貸し出す。金利差分3%(年間3億円)が収益となる。リスクは預金顧客の減少である。

その他サービス手数料:送金、為替など認可制業務の仲介で手数料を得る。M&Aの手数料を得る。貿易金融サービスで手数料を得る。

自己売買:自ら株債権を売買して利益を得る。

Income Source of Bank




What banks do to make money?

For normal people, banks are no more than cash cards.

Bank's income sources, not really clear for everybody, are,

Long Short gapping : Borrow show term low interest rate money to lend higher interest rate long term.  Long term - Short term interest rate difference becomes income for banks.  It is important to keep long term interest rate > short term interest rate. If difference shrinks, income shrinks, and if relationship flips to reverse side, banks will start losing money.
(Example) Borrow $100mn for every 1 month rolling on floating rate(0.1% PA(per annual) for example) to lend 10 yrs for $100mn at 3% PA. This result in $2mn(2% difference) PA.

Credit Risk Taking : Lend money to borrower with default risk at credit risk premium interest rate. Premium interest rate becomes earning.  Risk is the default of the borrower.
(Example) Lend $100mn to corp A for 10yrs at 5% PA. The interest rate when there is no default risk is 3%.

Deposits : Borrow money from lower interest rate deposit and lend to higher interest rate term deposit to make money out of interest rate difference.
(Example) Procure $100mn out of cash account(zero interest rate) or saving account(0.1%PA) to lend 10yrs at 3% PA. This generates interest rate difference income for 3%($3mn PA). Risk is the reduction of customer deposit base.

Other service fee: Money transfer, foreign exchange fee, basically inter mediation of regulated transactions. M&A fee. Income from export business support.

Proprietary trading : Make money by trading securities on bank's own account.

2019年8月29日木曜日

銀行の為替リスク FX Risk for a Bank

銀行の為替リスク

English Follows


為替レートが大きく動いた時、外貨の取り扱いが多い銀行は不安だろう。

でも、つぎの3つを知っておくと、不安はなくなる。

(1)バランスシート全体を見よう
(2)名前に惑わされない
(3)外貨調達方法による違いを知る

(1)バランスシート全体を見よう
一つ目の大きな不安要因は、為替リスクの影響について、貸借対照表の一つ一つの項目について話しているのか、それとも、ある取引のバランスシート全体への影響について話しているのか明確でないことだろう。

たとえば、外貨の借入の場合。外貨を借り入れると、資産に外貨、負債に借入が立つ。

外貨 1,000ドル / 借入 1,000ドル

この場合、外貨1,000ドルには為替リスクはもちろんある。借入1,000ドルにも為替リスクがある。

でも、この二つのリスクは為替レート変動時に打ち消しあい、バランスシート全体ではリスクはなくなる。結果、外貨借り入れ自体には為替リスクはないのである。

(2)名前に惑わされない
  為替スワップ、通貨スワップは、その名前からあたかも為替リスクがあるように聞こえる。しかし、実態は異なる通貨の定期貸出と、定期借入の組み合わせに過ぎず、為替リスクはない。為替スワップ、通貨スワップは、為替リスクを回避しつつ、外貨を調達する方法だ。

  [開始日]
  現金 100ドル / 借入 100ドル
  貸出 1万円   / 現金 1万円
  [満期日]
  借入 100ドル / 現金 100ドル
  現金 1万円   / 貸出 1万円

(3)外貨調達方法による違いを知る
  3つ目の混乱の原因は、外貨建て資産を購入する資金の調達方法による違いだろう。外貨建て資産をすでに保有している外貨で購入する場合、為替スワップで外貨を調達する場合、為替リスクは発生しない。しかし、為替スポットで外貨を調達して外貨建て資産を購入すると、為替スポットにより、為替リスクを伴うことになる。

  外貨で購入した場合、為替リスクとはならない
  債権 100ドル / 現金 100ドル
  株式 100ドル / 現金 100ドル

  円を為替スポットでドル変換した外貨で購入した場合、為替リスクとなる
  現金 100ドル / 現金 1万円
  株式 100ドル / 現金 100ドル

  円を為替スワップでドル変換した外貨で購入した場合、為替リスクはない
  [為替スワップ開始日]
  現金 100ドル / 借入 100ドル
  貸出 1万円   / 現金 1万円
  株式 100ドル / 現金 100ドル
  [為替スワップ満期日] 
  借入 100ドル / 現金 100ドル
  現金 1万円   / 貸出 1万円
   --> 株式を売却するまで、ロールオーバーし続ける
  貸出 1万円   / 現金 1万円
  株式 100ドル / 現金 100ドル

FX Risk for a Bank


When FX rate moves significant, Bank with lots of FX business may worry it‘s impact.

However, below 3 points may help to get away from such concerns.

(1) Look impact on balance sheet as a whole
(2) Don‘t be confused by naming
(3) Way to fund foreign currency makes difference
....

(1) Look impact on balance sheet as a whole
The biggest worry stems from the ambiguity of question itself whether we are talking about impact on each items on balance sheet or impact on balance sheet as a whole.

Let's take borrowing of foreign currencies as an example. When we borrow foreign currency, we see foreign currency in asset while borrowing in liability.

Foreign currency  $1K / Borrowing $1K

Here in this case above, foreign currency $1K has FX risk while, borrowing $1K also has FX risk.

However, two risks will offset each other when FX rate fluctuates, making no risk as a balance sheet as a whole. In nutshell, there is no FX risk from foreign currency borrowing itself.

(2) Don‘t be confused by naming
  Both FX swap and currency swap sound like as if they carry FX risk from naming. However, both products are nothing but a combination of term borrowing and term lending, hence there are no FX risk involved. FX swap and currency swap are way to procure foreign currency funding avoiding incurring FX risks.

  [Start Date]
       Cash $100         / Borrowing $100
     Lending JPY10K / Cash JPY10K
  [Maturity Date]
     Borrowing $100  / Cash $100
     Cash JPY10K      / Lending JPY10K

(3) Way to fund foreign currency makes difference
  The 3rd reason for the confusion is the difference between the ways of procurement of foreign currencies to purchase foreign currency denominated asset.  If funding for asset purchase is done through own foreign currency or FX swap, then there will be no FX risk. However, if we purchase foreign currency denominated asset by way of FX spot, then FX spot will incur FX risk.

  No FX risk if bought by own foreign currency cash
  Bond $100 / Cash $100
  Stock $100 / Cash $100

  FX risk emerge if bought by foreign currency procured through FX spot
  Cash $100 / Cash JPY10K
  Stock $100 / Cash $100

  There is no FX risk if foreign asset is bought by foreign currency fund procured through FX swap.
  [Start of FX Swap]
    Cash $100         / Borrowing $100
    Lending JPY10K / Cash JPY10K
    Stock $100        / Cash $100
  [Maturity of FX Swap] 
    Borrowing $100 /  Cash $100
    Cash JPY10K      / Lending JPY10K
                 --> Keep rolling over until sale of stock
    Cash $100         / Borrowing $100
    Lending JPY10K / Cash JPY10K
 

2019年8月20日火曜日

子供を野菜好きにする魔法の場所 Magic Place to Convert Kids to Vegetable Lovers

子供を野菜好きにする魔法の場所 

Magic Place to Convert Kids to Vegetable Lovers


野菜や果物がその場で食べられる、石田観光農園に行ってきた。こどもは大はしゃぎ。 Went up to Ishida farm harvest tour where you can harvest & eat vegetables and fruits on spot. Kids were all excited.  

そこは、野菜が大嫌いな子供も野菜好きにする食育の魔法の場所だった。That was a magic food-education-place for kids who hate vegetables, to convert to vegetable lovers.

野菜嫌いの子供にお勧め。人生変わるかも。Very much recommended for kids who hate vegetables. It can change their life. 














2019年8月11日日曜日

Google Photoの基本...DB-キー情報 Google Photo Basics... DB-Key information

Google Photoの基本...DB-キー情報 
Google Photo Basics... DB-Key information




デジカメの日付設定をし忘れ撮影したたため、写真ファイルの諸日付がすべて間違ってしまい、訂正した。Corrected photo file dates to adjust for wrongly set digital camera dates.

Google Photoは動画(MOV)については、メディアの作成日時、写真(JPEG)については撮影日時をDB(データベース)の時間軸キー情報として採用しているようだ。ファイルの作成日時、更新日時は利用されていないようだ。Google photo uses media creation date for movie(MOV) and shot date for pictures(JPEG) as time axis key info for DB(data base). File creation date nor update date look not used as key. 

一括変更には、写真(JPEG)については、作成日時、更新日時訂正で自動的に変わった。しかし、動画(MOV)についてはプロパティーの詳細にあるメディアの作成日時を一つづつ変えないと訂正できなかった。For collective changes, pictures(JPEG) are adjusted by creation date change as well as by revision date change. Meanwhile, movies(MOV) can be changed only by revising media creation date in property detail one by one.

作成日時(JPEG,MOV)一括変更 Collective change for creation date (JPEG, MOV)
Set-ItemProperty *.* -Name CreationTime -Value "YYYY/MM/DD hh:mm:ss"

更新日時(JPEG,MOV)一括変更 Collective change on revision date(JPEG,MOV)
Set-ItemProperty *.* -Name LastWriteTime -Value "YYYY/MM/DD hh:mm:ss"

メディアの作成日時(MOV)Media creation date(MOV)
GUIの詳細で一つづつ修正 Change one by one by GUI detail.

撮影日時(JPEG)Shot date(JPEG)
作成日時を修正すると同時に変わるようだ。一つづつGUIでも変更可能。Looks revised when creation date is changed. Can be changed one by one by GUI also. 

なお、Google Photoについては、保存枚数が1万枚を超える場合、普通のデジカメでは4桁のファイル番号しかないため、必然的にファイル名重複が起こる。が、現在のGoogle Photoでは、同じファイル名称でも撮影日時、メディア作成日時が異なれば異なる写真と認識するようになっているようだ。Google photo will inevitably face duplication of file names if number of files exceeds 10K since most of digital cameras have only 4 digits for file names. However Google photo will have no issue currently since it takes two photo files with same file name as different if shot date or media creation date are different. 

2019年8月6日火曜日

小学校3年生の原爆 A-bomb education to 3rd grader elementary school kid

小学校3年生の原爆 

- English Follows -


8月6日、原爆投下の日、小学校3年生の子供に原爆を説明した。

まず、原爆のアニメを見せ、

原水爆の威力のビデオを見せ、

人類が何度も全滅する量の核兵器備蓄を説明するうち、

真ん丸な目をして話を聞く、何も知らない子供に、

そもそも、何で未だに世界はこんなにひどい状態であるということを説明しなくちゃいけないんだ思い、

子供に責任のある大人として、とても情けなく、恥ずかしく、泣きたくなった。

A-bomb education to 3rd grader elementary school kid


On Aug 6th, A-bomb day, I explained 3rd grader kid what A-bomb is.

1st thing, showed animation on A-bomb,

Then showed the power of A-bomb, H-bomb,

And current global stockpiling of A-bomb that can make human-being to go extinct several times, etc. ...

As I explained to my kid with wide opened innocent round eyes wishing to know what that is,

I felt, why the hell we have to explain kids that current world is still in such a terrible situation.

As an adult responsible for kids, I felt very sad, ashamed and crying.

2019年7月30日火曜日

人類生き残り作戦..2019OKを見て Survival Mankind, seeing 2019OK

 人類生き残り作戦..2019OKを見て

English Follows



100m級隕石2019OKは、先週木曜日2019/7/25、地球と月との1/5弱の距離を秒速24kmでニアミスした。バリンジャー隕石の(写真)の倍の大きさだ。

発見は、通過するほんの数時間前だった。

もう、そろそろ、人間は、世界レベルの目標を設定してはどうだろう?

人はもう、いろいろなことを知っている。

宇宙誕生から140億年、太陽系・地球誕生から50億年。

生命誕生から40億年、そして人間の歴史は100万年。

アンドロメダ星雲と銀河系の衝突まで40億年。

これから地球に住めるのはあと20億年、

そして、1億年に一回の、隕石、地殻異変による大量絶滅。


遺伝子に組み込まれた本能は、いままで地球上で争いももたらして来た。

だが、その本能を人類の絶滅回避に転化しよう。 

地球の上での無駄な戦いに時間を浪費するのはやめよう。

だれかが言うだろう。「億年単位なんて、バカみたい」。 確かに時間軸スケールが違う。

でも、人間は、自分の世代近辺だけにしか目が向かない段階から進化している。


では、以下、世界目標の提案、これはずばり、

「人類生き残り作戦」 

「敵」は人類を絶滅させる、隕石、天変地異であり、これに全人類で立ち向かう。

共通の敵に立ち向かうことで、人類の共通の目的が共有され、争いはなくなる。

人類に対する大きな敵の前で、地球上の内輪もめで時間を浪費する人はいないだろう。


以上

Survival Mankind, seeing 2019OK 


100m-size meteor 2019OK passed 1/5 earth-moon distance, last Thursday Jul 25th, 2019. It was found only few hours before it passed earth. It is double the size of meteor that created Barringer Crater (picture above).

Now it is time to for mankind to have global objective,

We already know lots of things.

14 billion year since the birth of cosmos, 5 billion year since the birth of solar system and the earth.

4 billion year since the birth of lives.

4 billion year by the collision of milky way and Andromeda galaxy.

2 billion year until earth stop to be habitable.

And mass extinction for every 100 million year by meteor collision and plate tectonic abnormalities.

Basic instinct embedded in our gene brought war on earth.

But now it’s time to flip that instinct into the prevention of mass extinction of mankind.

Stop wasting time on useless war on earth.

Somebody may say, such a fool to think of 100 million years. True that time scale is off the common sense.

However, mankind is now evolved enough to think in longer term not just current generation.

Below, see proposals for world objective.

Survival Mankind

Enemy is meteor collision or natural disasters and we face these as team mankind.

Sharing the same enemy, can share objective as mankind, then war will end.

No one will dare waste time on domestic conflict confronted by huge enemy against mankind.


That`s all.