2014-01-01から1年間の記事一覧

信用ハザード率

ハザード関数が 「現時点で失敗の確率」/「現時点まで残った確率」。 I understand this definition of the hazard rate, but the definition in terms of Treasury spread and recovery rate is less clear. h=(yb-yt)/(1-R) where yb is the corporate bon…

一点が三角に入っている事を試す

最近トップコーダーのアルゴリズム問題に苦しんでいます。Given a set of vertices, one was required to compute the number of triangles constructed from those vertices which contain the origin. While enumerating the triangles is a trivial tripl…

決定木の関数計算

最近スタンフォード大学のフリードマン教授が書いた決定木に関する論文を読んでいます。勾配ブースティングモデルという方法が最適な決定木関数をデータから由来する。 一つな曖昧なところは改善関数です。The formula for improvement of a given split is …

信用リスクによる利益訂正

最近pricederivatives.comの方程式を見ながらススワップの値段を計算しようとしています。The initial computation for CVA is present value of notional (positive)*recovery rate*Counterparty CDS spread*number of years. Strangely, though, the cited…

電気回路作成のアルゴリズム問

最近トップコーダーの最適化問題を挑戦しています。It was initially thought I could assign one of the minimal resistances as one input to each B gate, but this discounted the possibility of nested gates. For example, if 2 B gates are children…

信用リスクとキュムラント母関数

In reading about credit risk, I was perplexed by a metric psi and the use of the expression "cumulant generating function". The cumulant generating function is the log of the moment generating function, it seems. The article also involves …

複雑性が不明な動的計画アルゴリズム

最近トップコーダーの問題を解くために検索アルゴリズムを書いたが時間的の制限を証明できません。最悪の場合は choose(26,2)^25なので永遠に動く可能性がありそうです。二つな方法を試して見たが両方が時間的に遅すぎた。The complexity of both of my solu…

信用リスクを計算する方程式

最近フーリエ変換に頼るリスク計算方法に関わる論文を読んでいます。 Credit Risk+ assumes portfolio defaults follow a Poisson distribution, and uses a Fast Fourier Transform to solve for the credit loss probability distribution. The logic conn…

二つの変数によるガウス確率分布の続き

In fact, it is easier to solve for the general multivariate Gaussian and then substitute for x with n=2. For x as am n-dimensional vector of independent normal random variables with mean 0 and variance 1, f(x) = (1/(2pi))^(n/2)e^*1. By the…

XORの問題

最近トップコーダーの色混ぜ問題で混乱しています。目的は最少の色を使う事です。Two approaches are possible to span all colors. One is to simply enumerate the numbers, so the count is n for n numbers. The other option is to specify a basis of …

グラフ理論と組み合わせ論の問題

最近トッポコーダーの「ランドムグラフ」と言う問題を挑戦したが解けませんでした。 目的は全てな頂点が接続されている部分が含まれているグラフ確率を計算する事です。 Outputting the number of graphs with a given number of vertices (up to 50), is fe…

データ構造と検索

またトップコーダーオープンのアルゴリズム問題に苦しんでいる。 今回壁を行と列に置かなければいけません。しかし隙間を分裂する問題もある。羊とオオカミの間に置く。しかし順番の問題があります。ギャップに壁を置く前にギャップを並べ替えるのが必要かど…

実物の資産と派生証券の層

最近結構複雑の論文を読んでいます。The paper discusses the value gained from dividing a pool of cash flows into tranches and selling securities. The notation for expressing the value of these tranches to investors is somewhat byzantine, inv…

データ構造:Depth-first search with uncertain bound

最近トップコーダーの問題を解くため再帰探索を使用するが最悪の場合に14!の複雑性があるそうです。しかし一つの状態で可能な状態空間が縮まるから実際に計算しなければいけない数がそんなに多くない。状態数が3^14以下であればパソコンが耐えられます。

再帰的で記録を使う魔法

本日トップコーダーのアルゴリズムを解けて一つな驚きがありました。ただの再帰関数で行けると思ったけど時間的に遅すぎた。However, recursive search on the string (converted to a char vector) with memorization (string->optimal string) succeeded w…

二の累乗の問

最近他のアルゴリズム問題を見ながら混乱しました。二進コードのすべての件を数えて余分な物を引く方法でいけなかった。他の探索空間が必要だそうです。トップコーダーの解説を見れば動的計画法の答えが可能です。でもまた最初に見て考えられない正解です。…

また再帰探索がいけないアルゴリズム問

組み合わせ数学の問題を普通な離散検索で解けませんでした。動的計画法の視点で考えればいいと思ったけど道が発想しません。正解が動的計画法でしたが実施が少し以外な事でした。The dynamic programming map is a 3-dimensional collection of long long in…

取引先の信用リスクを図る

CCRの損失額を計算する方法に関して悩みました。ジェーピーモルガンのリュウ氏が提出した計算式は L(T) = SIGMA(iT)(CVA(T)-CVA(0)) This appears to be the sum of the expected losses by defaults before time T and the capital needed to be carried to…

グリーディアルゴリズムが不適格

強欲な方法は正しく全てのケースを解けなかった。全部の分離を試すブル―ト・フォースの方法もあるけど必要ではないはずです。やっぱり右に移す件と左に移す件を分離する位置は全ての所を試さなければいけません。All possible partition points must be sear…

無理な木構造を辞めてから

動的計画法を使用しました。時間とメモリの使用量はO(N^3)です。木構造を探索すれば複雑性が指数関数です。鍵の発明は空間中のすべての移動点が入力点の行か列を共用する事です。