Home      Mainframe Forum      Mainfarme Tutorials      IBM Manuals      Mainframe Interview Questions      Mainframe Books      IT News     SiteMap     Downloads

 MAINFRAME - TIP OF THE DAY : programming pearls - Good judgement comes from experience, and experience comes from bad judgement.

 Web mainframegurukul.com

Programmers Voted for below topics.      Please Vote for good Posts. Votes Salutes
Author Message

Member

Joined: 28 Feb 2012
Posts: 3

 0 salutes

 Posted: Tue Feb 28, 2012 7:30 pm    Post subject: [Quetion]How to improve efficiency when calculating IRR As COBOL doesn't provide the build-in function IRR(), I tried to code it myself in COBOL which run in mainframe batch. Below provided the calulation details. Formula: NPV=Cash Flow 1 / (1 + IRR)**1 + Cash Flow 2 / (1+IRR)**2 + ... + Cash Flow n / (1+IRR)**n - Investment Target: to calculate IRR value when NPV=0. Algorithm: use iteration & dichotomy method, i.e. firstly set IRR in [-1,1], use IRR=(-1+1)/2=0 to calculate NPV. If NPV = 0, then get IRR value 0. If NPV < 0, then set IRR in [-1,0], use IRR=(-1+0)/2=-0.5 to calculate NPV... If NPV > 0, then set IRR in [0,1], use IRR=(0+1)/2=0.5 to calculate NPV... Loop the above calculation until get the IRR value. Problem: As the input data volume is huge, the program efficiency is obviously poor. Would you please advise if there is any solution which could improve the efficiency? A. Improve the algorithm? B. Use another program language, e.g. assembler? C. ... ? Thanks and Regards Terry[/list]
 <-- Click on right mark icon. If this post answer your question.

Moderator

Joined: 02 Oct 2006
Posts: 975

 0 salutes

 Posted: Tue Feb 28, 2012 8:16 pm    Post subject: you may wish to read this: http://finance.thinkanddone.com/irr.html_________________Dick Brenholtz JCL, SQL and code in programs have an irritating habit of doing what you say, not what you meant.
 <-- Click on right mark icon. If this post answer your question.

Member

Joined: 28 Feb 2012
Posts: 3

 0 salutes

 Posted: Thu Mar 01, 2012 11:59 am    Post subject: I chose Newton Raphson Method. Thanks a lot for your kind help, Dick! _________________Thanks and Regards, Terry
 <-- Click on right mark icon. If this post answer your question.
 Display posts from previous: All Posts1 Day7 Days2 Weeks1 Month3 Months6 Months1 Year Oldest FirstNewest First
 All times are GMT + 5 Hours Page 1 of 1

 Jump to: Select a forum This Website----------------Admin AnnouncementsModerators Only APPLICATION PROGRAMMING----------------COBOLJCLDFSORT , ICETOOL & UtilitiesCICSEASYTRIEVE DATA MANAGEMENT SYSTEMS----------------DB2 SQL - DB2 PROGRAMMINGVSAM - File systemIMS DBIDMS TOOLS----------------XPEDITERFILE-AIDCHANGE MANENDEVOR, COOLGEN , PANVALET and CA-7 OTHER LANGUAGES----------------TSO, CLIST & REXXPL/IASSEMBLERIMS/DC CAREERS / JOBS DISCUSSIONS / INTERVIEW QUESTIONS----------------JOB VACANCIESJOB DISCUSSIONABEND CODES / ERROR CODESDB2 INTERVIEW QUESTIONSCOBOL INTERVIEW QUESTIONSJCL INTERVIEW QUESTIONSVSAM INTERVIEW QUESTIONSCICS INTERVIEW QUESTIONSINTERVIEW QUESTIONS OTHER MAINFRAME SUBJECTS----------------XMLMQSERIES & WEBSPHEREOTHER SUBJECTS GENERAL FORUMS----------------EntertainmentGeneral DiscussionPersonality DevelopmentOff TopicsSuggestions & Feedback
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

  Topics   Replies   Author   Views   Last Post Related topics Query For IEBPTPCH 3 padmajeet.gaikwad 13108 Mon Feb 01, 2016 10:56 pmacademyindia4 Unable to achieve below scenario using ICETOOL 27 sirianangel 33227 Mon Feb 01, 2016 10:01 pmacademyindia4 Need to put records a Sorting order as mentioned below. 14 Yash1911 12244 Mon Jan 25, 2016 9:50 pmacademyindia4 how to deal with the below scenario using iebgener 7 mainframes_6002 10746 Wed Dec 07, 2011 10:34 amDikDude Coulu someone explain the parameters in the below code? 1 lovely sweety 11003 Thu Jun 09, 2011 3:50 pmdbzTHEdinosauer

 Cobol TutorialThis cobol tutorial covers most of the important topics like STRING, UNSTRING, COMP, COMP-3..... DB2 TutorialDB2 Tutorial focuses on DB2 COBOL Programming. Explains in simple language. Some Chapters are locked, Forum members have free access to these chapters CICS TutorialThis CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming... JCL TutorialThis is most popular JCL tutorial from mainframegurukul. It does contain important jcl .... SORT TutorialThis Tutorial covers all important aspects of DFSORT. Has more SORT examples INTERVIEW QuestionsThis page covers important interview questions Mainframe Jobs Mainframe Jobs posted by members of mainframegurukul forum FaceBook PageMainframeGurukul FaceBook Page LinkedIn PageMainframeGurkul Linkedin Page

 Online ABEND Reference ||  JCL References ||  COBOL References ||  VSAM References ||  Tutorials by Drona Series ||  SQL tutorial ||  BOOKS  ||  DB2 INTERVIEW QUESTIONS ||  COBOL INTERVIEW QUESTIONS  ||  JCL INTERVIEW QUESTIONS ||  JCL2 INTERVIEW QUESTIONS ||  VSAM INTERVIEW QUESTIONS ||  CICS INTERVIEW QUESTIONS  ||  Online tutorials ||  Online ABEND Reference ||  JCL References ||  COBOL References ||  VSAM References ||  Tutorials by Drona Series ||  SQL tutorial ||  BOOKS  ||  SiteMap  ||  Expeditor Tutorial  ||  FILE-AID Tutorial  ||  Changeman Tutorial  ||  COBOL   ||  DB2   ||  JCL  ||  CICS  ||  VSAM  ||  DB2 Interview Questions ( 110 )   || Simple JCL Tutorials  || JCL Tutorial from MainframeGurukul.com   || Simple JCL Tutorial - Chapter1 ;|| Mainframe Forum - Tutorials  || Mainframe Tutorials || Mainframe CICS tutorial|| Mainframe COBOL Tutorial Drona Educational Forums - Mainframe Cobol DB2 CICS Board Powered by phpBB
mainframetopic-6322.html