0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

金融のテナーを期間順にソートする方法

Last updated at Posted at 2020-11-14

金融業界では、ReutersやBloombergなどのデータベンダーからデータを取得することが多い。

ベンダーから取得した生データは数値部分が先頭に配置されているため、時系列の順にソートされない。

生データのソート.txx
110M,10Y,11M,11Y,12M,12Y,13Y,14Y,15M,15Y,16Y,17Y,18M,18Y,19Y,1D,1M,1W,1Y,20Y,21Y,22Y,23Y,24Y,25Y,26Y,27Y,28Y,29Y,2D,2M,2W,2Y,30Y,31Y,32Y,33Y,34Y,35Y,36Y,37Y,38Y,39Y,3D,3M,3W,3Y,40Y,4M,4Y,5D,5M,5Y,6M,6Y,7D,7M,7Y,8M,8Y,9M,9Y,O/N,T/N

この生データのソート順を期間順に変更するための手順を示す。

tenor.txt
O/N,T/N,1D,2D,3D,5D,7D,1W,2W,3W,1M,2M,3M,4M,5M,6M,7M,8M,9M,10M,11M,12M,1Y,15M,2Y,18M,3Y,4Y,5Y,6Y,7Y,8Y,9Y,10Y,11Y,12Y,13Y,14Y,15Y,16Y,17Y,18Y,19Y,20Y,21Y,22Y,23Y,24Y,25Y,26Y,27Y,28Y,29Y,30Y,31Y,32Y,33Y,34Y,35Y,36Y,37Y,38Y,39Y,40Y

1 Excel > File > Option > Advanced > Edit Custom Lists

image.png

2

Add > 上記のtxt内の文字列を貼り付け > OK
image.png

これでExcelが自動でユーザー定義のソート順を判断し、並び替えてくれる。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?