Home Java javaTutorial Internal Rate of Return Solver with Corticon

Internal Rate of Return Solver with Corticon

Oct 04, 2024 am 06:09 AM

내부수익률

Corticon의 반복 실행 기능을 사용하면 가능한 최상의 답을 찾아야 하는 계산을 해결할 수 있습니다.

내부 수익률(IRR)은 무엇보다도 투자의 수익성과 기회 비용을 평가하는 데 사용되는 재무 척도입니다. 일반적인 사용 사례는 다음과 같은 투자 추구 여부를 평가하는 것입니다.

  • 초기비용(투자비) $5000
  • 1년차 - $0 반품
  • 2년차 - $2000 반품
  • 3년차 - $0 반품
  • 4년차 - $4000 반품
  • 5년차 - $0 반품
  • 6년차 - $9000 반품

내부 수익률은 다음 공식을 사용하여 해결됩니다.

Internal Rate of Return Solver with Corticon

숫자를 대입하면 다음과 같습니다.

~0 = (0/(1 IRR)^1 2000/(1 IRR)^2 0/(1 IRR)^3 4000/(1 IRR)^4 0/(1 IRR)^5 9000/( 1 IRR)^6) - 5000

순 현재 가치(NPV)가 0(또는 X 소수점 이하 자릿수 내에서 최대한 가까운) IRR을 구합니다. 따라서 IRR이 가능한 한 0에 가까워지도록 다양한 값을 반복적으로 시도해야 합니다.

규칙

먼저 규칙 어휘입니다.

Internal Rate of Return Solver with Corticon

Candidate, Cashflow라는 3개의 엔터티와 루트 엔터티인 Investment가 있습니다. 투자에는 우리가 평가할 현금 흐름이 얼마든지 있습니다. 또한 결정 실행 중에 생성될 후보의 수는 무제한이며 연결될 다양한 비율을 나타냅니다.

입력은 단순히 상위 엔터티인 투자이며 모든 해당 현금 흐름과 해당 순서를 표시하는 할부 번호가 있습니다. 첫 번째 현금 흐름은 항상 현금 유출이므로 그 금액은 항상 음수입니다. 할부 번호로 값 0을 사용합니다.

다음 규칙은 다음과 같습니다.

  • 결과 NPV에 따라 증가하거나 감소하는 IRR 값을 초기화하는 것부터 시작합니다. 마찬가지로 초기 현금 흐름의 값을 투자 엔터티의 '원금' 속성에 넣은 다음 해당 현금 흐름을 제거하여 미래 흐름에만 더 쉽게 적용할 것입니다.

Internal Rate of Return Solver with Corticon

  • 이 첫 번째 규칙 시트를 나중에 런타임 결정 서비스로 생성될 새 규칙 흐름으로 드래그하겠습니다. 규칙 플로우에는 규칙 시트와 '내장된' 규칙 플로우가 포함될 수 있습니다. 우리는 두 개의 추가 규칙 시트를 포함하는 내장된 규칙 플로우를 생성하고, 규칙 플로우 팔레트에서 '반복' 옵션을 적용하여 후보 IRR 비율을 시도하면서 이 내장된 규칙 플로우를 반복할 것입니다.

Internal Rate of Return Solver with Corticon

  • 규칙 흐름의 객체가 반복되도록 설정되면 객체의 규칙에 의해 파생된 값이 변경되지 않을 때까지 반복적으로 다시 실행됩니다. 객체의 값 변경이 중단되면 반복이 중지되고 실행이 다음 객체(커넥터에 의해 결정됨)로 계속됩니다.
  • 내부 규칙 흐름에는 두 개의 규칙 시트가 있습니다.

Internal Rate of Return Solver with Corticon

  • 첫 번째는 최종 계산에 기여하는 각 개별 현금 흐름의 부분을 계산합니다. 예를 들어 현금 흐름 3의 '부분' 속성은 0/(1 IRR)^3의 결과가 됩니다.

Internal Rate of Return Solver with Corticon

  • 내장된 규칙 흐름의 두 번째 규칙 시트는 다음과 같습니다.
    • Investment.npv를 각 현금 흐름 부분의 합계에서 초기 투자금을 뺀 값으로 설정
    • npv가 0보다 크면 irr을 .01씩 늘리고, 0보다 작으면 .01씩 줄입니다.
    • 그러나 무한 루프에 빠지지 않도록 이미 주어진 속도를 시도했는지 여부를 알아야 합니다. 여기가 후보가 들어오는 곳입니다. 이미 시도된 비율에 도달할 때까지 시도하는 각 비율에 대해 새 후보를 생성합니다. 이 시점에서는 아무 작업도 트리거되지 않고 계산된 값이 반환됩니다.

Internal Rate of Return Solver with Corticon

최상위 규칙 흐름에 대해 테스트하면서 $5000 투자에 대해 위에 나열된 사용 사례를 기반으로 입력을 설정했습니다. Corticon은 IRR을 .27(27%)로 결정했습니다.

Internal Rate of Return Solver with Corticon

When we run the ruletest with ruletrace, we can see how Corticon has looped through the rules with each tweaked rate until it got as close to zero for the investment's NPV as it could.

Internal Rate of Return Solver with Corticon

The rule trace data can be exported to a CSV as well.

Internal Rate of Return Solver with Corticon

Download project from GitHub

The above is the detailed content of Internal Rate of Return Solver with Corticon. For more information, please follow other related articles on the PHP Chinese website!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Is the company's security software causing the application to fail to run? How to troubleshoot and solve it? Is the company's security software causing the application to fail to run? How to troubleshoot and solve it? Apr 19, 2025 pm 04:51 PM

Troubleshooting and solutions to the company's security software that causes some applications to not function properly. Many companies will deploy security software in order to ensure internal network security. ...

How to simplify field mapping issues in system docking using MapStruct? How to simplify field mapping issues in system docking using MapStruct? Apr 19, 2025 pm 06:21 PM

Field mapping processing in system docking often encounters a difficult problem when performing system docking: how to effectively map the interface fields of system A...

How to elegantly obtain entity class variable names to build database query conditions? How to elegantly obtain entity class variable names to build database query conditions? Apr 19, 2025 pm 11:42 PM

When using MyBatis-Plus or other ORM frameworks for database operations, it is often necessary to construct query conditions based on the attribute name of the entity class. If you manually every time...

How do I convert names to numbers to implement sorting and maintain consistency in groups? How do I convert names to numbers to implement sorting and maintain consistency in groups? Apr 19, 2025 pm 11:30 PM

Solutions to convert names to numbers to implement sorting In many application scenarios, users may need to sort in groups, especially in one...

How does IntelliJ IDEA identify the port number of a Spring Boot project without outputting a log? How does IntelliJ IDEA identify the port number of a Spring Boot project without outputting a log? Apr 19, 2025 pm 11:45 PM

Start Spring using IntelliJIDEAUltimate version...

How to safely convert Java objects to arrays? How to safely convert Java objects to arrays? Apr 19, 2025 pm 11:33 PM

Conversion of Java Objects and Arrays: In-depth discussion of the risks and correct methods of cast type conversion Many Java beginners will encounter the conversion of an object into an array...

E-commerce platform SKU and SPU database design: How to take into account both user-defined attributes and attributeless products? E-commerce platform SKU and SPU database design: How to take into account both user-defined attributes and attributeless products? Apr 19, 2025 pm 11:27 PM

Detailed explanation of the design of SKU and SPU tables on e-commerce platforms This article will discuss the database design issues of SKU and SPU in e-commerce platforms, especially how to deal with user-defined sales...

How to elegantly get entity class variable name building query conditions when using TKMyBatis for database query? How to elegantly get entity class variable name building query conditions when using TKMyBatis for database query? Apr 19, 2025 pm 09:51 PM

When using TKMyBatis for database queries, how to gracefully get entity class variable names to build query conditions is a common problem. This article will pin...

See all articles