excel - 将 9 位 CUSIP 代码转换为 ISIN 代码

标签 excel type-conversion finance

如何将 9 位 CUSIP 代码转换为 ISIN 代码(最好是在 Excel 中)?

最佳答案

CUSIP 完全包含在 ISIN 中。然后,ISIN 以 2 个字母为前缀(在本例中为“US”或“CA”,因为 CUSIP 是北美标识符)并在末尾添加一个数字。

确定末尾的数字:

ISIN US0378331005, expanded from CUSIP 037833100. The main body of the ISIN is the original CUSIP, assigned in the 1970s. The country code "US" has been added on the front, and an additional check digit at the end. The country code indicates the country of issue. The check digit is calculated in this way.

Convert any letters to numbers:

U = 30, S = 28. US037833100 -> 3028037833100.

Collect odd and even characters:

3028037833100 = (3, 2, 0, 7, 3, 1, 0), (0, 8, 3, 8, 3, 0)

Multiply the group containing the rightmost character (which is the FIRST group) by 2:

(6, 4, 0, 14, 6, 2, 0)

Add up the individual digits:

(6 + 4 + 0 + (1 + 4) + 6 + 2 + 0) + (0 + 8 + 3 + 8 + 3 + 0) = 45

Take the 10s modulus of the sum:

45 mod 10 = 5

Subtract from 10:

10 - 5 = 5

Take the 10s modulus of the result (this final step is important in the instance where the modulus of the sum is 0, as the resulting check digit would be 10).

5 mod 10 = 5

So the ISIN check digit is five.

来源:http://en.wikipedia.org/wiki/International_Securities_Identification_Number

关于excel - 将 9 位 CUSIP 代码转换为 ISIN 代码,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30545239/

相关文章:

swift - 如何在 swift 中转换混合大小整数数组

c# - "For money, always decimal"?

vba - 为什么 Excel RGB 值向后?

java - APACHE POI 创建损坏的文件 - 无论我做了什么更改

excel - 将用户窗体与 Excel 中的单元格对齐

arrays - Julia:初始化不同类型的数值数组

java - 使用 Apache POI 扩展 Excel 中的现有表

C# 隐式转换和 == 运算符

Java编译器告诉我我还没有初始化变量 "interest"或 "pmt"

python - 使用分组边界的 SciPy 优化