人力検索はてな
モバイル版を表示しています。PC版はこちら
i-mobile

Excelの財務関数・PPMT関数をPHP関数化したいです。

ご教示くださいませ。

PMT関数は以下のように関数化できたのですが・・・よろしくお願いいたします。

function pmt($apr, $term, $loan) {
$term = $term * 12;
$apr = $apr / 1200;
$amount = $apr * -$loan * pow((1 + $apr), $term) / (1 - pow((1 + $apr), $term));
return number_format($amount, 2);
}

●質問者: ruijio
●カテゴリ:コンピュータ
○ 状態 :終了
└ 回答数 : 1/1件

▽最新の回答へ

1 ● rsc
●300ポイント

こちらは参考になるでしょうか。
●File Source for Finance.php - Pear
https://pear.php.net/package/Math_Finance/docs/latest/__filesource/fsource_Math_Finance__Math_Finance-1.0.1MathFinance.php.html
・GitHub版
https://github.com/pear/Math_Finance/blob/master/Math/Finance.php
以下、C,JavaScript,Javaなどのソースも見つかりました。
●GC: Finance - org.apache.poi.ss.formula.functions.Finance (.java) - GrepCode Class Source
http://grepcode.com/file/repo1.maven.org/maven2/org.apache.poi/poi/3.10.1/org/apache/poi/ss/formula/functions/Finance.java#Finance.ppmt%28double%2Cint%2Cint%2Cdouble%29
●Few Excel formulas - PMT, PPMT, XIRR - expressed in ...
https://gist.github.com/pies/4166888
●src/java/org/apache/poi/ss/formula/functions/Finance.java
https://apache.googlesource.com/poi/+/4d81d34d5d566cb22f21999e653a5829cc678ed5/src/java/org/apache/poi/ss/formula/functions/Finance.java
●A Guide to the PMT, FV, IPMT and PPMT Functions
http://www.experts-exchange.com/articles/1948/A-Guide-to-the-PMT-FV-IPMT-and-PPMT-Functions.html

関連質問

●質問をもっと探す●



0.人力検索はてなトップ
8.このページを友達に紹介
9.このページの先頭へ
対応機種一覧
お問い合わせ
ヘルプ/お知らせ
ログイン
無料ユーザー登録
はてなトップ