风险管理软件crystalball使用指导

合集下载

crystal_ball_软件教学

crystal_ball_软件教学
Crystal Ball模拟基础教程
13-4
报童佛莱迪
➢ 佛莱迪在某大城市里主要市区经营一家报摊。
➢ 佛莱迪贩卖各类的报纸和杂志,其中最贵的报纸为财 经日报 。
➢ 财经日报相关的成本资料:
– 每份报纸的成本为1.50美元 – 每份报纸的售价为2.50美元 – 没售出的报纸,每份报纸可以获得0.50美元的偿还金
➢ 财经日报的销售资料:
– 佛莱迪每天的销售量介于40到70份之间。 – 销售数量介于40到70份之间任何数值的频率相同。
13-5
运用仿真之电子表格模式
13-6
CrystalBall的应用
➢ 利用CrystalBall来进行计算机仿真有四个步骤:
1. 定义随机输入栏。 2. 定义输出栏来预测。 3. 设定执行偏好。 4. 执行模拟。
某一事件发生次数之分配:二项分配
➢ 描述在固定试验次数内的事件发生次数(如:丢10次铜板出现正面的 次数)
➢ 每次试验只有二种可能结果 ➢ 试验相互独立 ➢ 每次试验的机率相同
13-62
直到某事件发生的试验次数:几何
➢ 描述事件发生前的试验次数(如在转轮盘赌局中获胜前的下注 次数)
➢ 每次试验的机率皆相同 ➢ 成功前不能停止 ➢ 试验次数不限定
13-56
具有三个参数的分配:韦伯分配
➢ 某数值(位置)以上的随机数值 ➢ Shape(形状参数)> 0(通常 ≤10) ➢ Shape < 3会太过正偏态较(小于平均值的机率较大),类似
指数分配(當Shape =1时与指数分配相等) ➢ 当Shape =3.25时为对称形,超过这个数值为负偏态 ➢ Scale(规模参数)定义宽度
13-53
一种常用集中趋势分配:对数常态分配

风险管理工具_CrystalBall在企业经营风险管理中的应用

风险管理工具_CrystalBall在企业经营风险管理中的应用

3.7 决策表(Decis ion Table) 决策表是用来表示当决策变量取
定义第 2 年 ~ 第 5 年的累积税后利润为预测变量是类似的。
不同的值时,选定的目标预测变量均值的变化。
271
例如,模型中有 2 个决策变量:“前两年生产线数量”和“后三年 新增生产线数量”。在运用决策表之前,需要先定义这两个决策变量。
图 12 生成决策表的第 2 步:选择决策变量
图 10 定义决策变量“后三年生产线数量”对话窗口
在图 10 中,输入变量名,选择变量上下界(Variable Bounds), 下界 (Low er) 为 1,上界 (Upper) 为 3。选择变量类型(Variable Type)为“离散(Diccrite)”,输入步长(Step)为 1。
很多,如财务风险、时间风险、人身伤害风险、名誉风险等。有的风险 年生产线数量 (B2)×固定资产折旧率 (B8);后三年固定资产折旧
可以度量,有些则难以度量。在企业经营中,财务风险是最常见的,财 (D23~ F23)=(前两年生产线数量(B2)+ 后三年新增生产线数量(B3))
务风险通常可以度量。风险的来源是事件的不确定性,不确定性越 ×固定资产折旧率(B8);税前利润(B25~ F25)= 销售收入—生产成
和销售的产品为某种原料,根据预测,这种原料的需求量第 1 年为 布、泊松分布等多种随机变量的分布。为了简化例子,我们假定模型
20 吨,以后每年增加 2 吨。引进这种原料生产线的建设投资为每条 中所有的随机变量都服从正态分布。它们的均值就是相应数据单元
30 万元,每条生产线的生产能力为每年 7 吨。如果开工生产线太少, 格的值,标准差等于均值的 10% 。
Crys tal Ball 是美国 Decis ioneering 公司开发的,它提供了项目 积税后利润都是负值,第 4 年的累积税后利润首次为正值。即该企

CrystalBall实验操作过程教学教材

CrystalBall实验操作过程教学教材

C r y s t a l B a l l实验操作过程Crystal Ball实验操作过程实验一:一、数据录入与导入双击CB快捷方式图标或直接打开Excel打开软件。

前面提到过Crystal Ball 软件是在Excel里的一个插件,所以双击打开后是Excel的界面,如下图:图 1用户可以在该界面中直接录入数据,也可以左击右上角的符号,选择打开,将原有Excel表格中的数据直接导入到带有Crystal Ball插件的电子表格中。

二、拟合分布图2(1)对数据进行标准化处理(减少原数据相互间的距离对拟合分布的影响)通过Average计算每个分布工程样本数据的均值,然后各个样本数据除以相应的均值,对数据进行标准化处理。

(2)拟合分布选取表格区域,点击工具栏上“Run-Tools-Batch Fit”,如图3所示。

图3在操作对话框中,选择“next”,至图4对话框对相应命令进行选择,可得到拟合过程的相关数据。

图4注:对于卡方检验,水晶球软件计算p值,p值大于0.5一般表示紧密拟合;对于科尔莫格洛夫-斯米尔诺夫检验,一般地,小于0.03的K-S值表明良好拟合;对于安德森-达林检验,小于1.5的计算值一般表明拟合优良。

实验二:一.按照实验一的操作,先将数据在Crystal Ball软件打开.二、假设单元格概率分布的定义及相关操作输入数据后,进行随机变量假设单元格概率分布的定义。

这里假设使用悲观时间的单元格来进行概率分布的定义。

(注:对于假设单元格的选择,并无太多的限制,因为定义各种概率的分布,是由相应的参数确定的,因此选择的假设单元格不同对结果并没有影响。

)有一点需要注意的是,选择假设单元格时,该单元格应当是一确定的数字,而不能是公式.选定单元格(如单元格I2)后,点击工具栏上的,随即弹出图5,CB 软件中提供22种不同的分布可供选择,根据实验任务书的要求,第一和第二项分部分项工程服从三参数beta分布,因此,选择BtaPERT分布,并填入相应参数,即可完成对“基坑支护挖土方”的定义,如图6所示。

量化风险管理(2)-水晶球软件工具使用

量化风险管理(2)-水晶球软件工具使用

/s/blog_493a8455010099wg.html量化风险管理(2)-水晶球软件工具使用CMMI四级里面对风险的量化分析,和基于量化数据的改进是很重视的。

前面我们谈到过当我们确定要改进一个目标的时候,比如缺陷密度DD,我们首先要确定有哪些因子会影响到缺陷密度,分析出来后需要根据历史数据进行相关性分析,分析完成后即可以建立起PPM 的预测模型。

比如我们可以得到关于缺陷密度的预测模型为:Defect Density = 389 + 2.12RV + 5.32DC – 24.1QCRV - 需求的不稳定性。

DC - 设计的复杂度。

QC - 评审和Review等坚持工作的有效性。

有了这个模型后,我们就可以结合我们的目标来寻找如何去改进。

比如我们现在的目标是期望在90%的概率的情况下,缺陷密度都能够控制在<0.35的范围内。

根据现在的历史数据我们可以得到如下的各个因子的分布区间:有了这个数据后我们就可以按照水晶球软件对我们期望的DD值进行蒙特卡洛模拟。

该软件的下载地址为:/。

我们只需要对三个影响因子的概率分布进行简单的设置,对需要模拟的目标进行设置后,系统就会自动的根据概率分布进行1000次的模拟。

通过模拟后我们可以得到下图:可以看到在90%的概率下,现在能够保证的是缺陷密度DD是<0.42。

没有达到我们的要求。

因此我们必须对三个影响因子进行改进,可以是调整均值,也可以是调整其标准差。

究竟是调整哪个因子,我们可以通过因子的敏感性分析来确定究竟哪些因子对目标的影响最大,如下图:通过该图我们可以调整对目标影响较大的QC,调整完成后我们再进行模拟看是否目标已经达到我们的要求。

达到要求后我们就可以得到具体的QC的改进目标,比如QC需要调整到(7,10)的范围内,最可能值在8左右才能够满足我们对目标的需求。

分享到新浪微博已投稿到:排行榜圈子阅读(625)|评论(3)|收藏(1)|打印|举报前一篇:时间管理的核心是什么后一篇:新浪博客新版本的几个有意义的改进_ad_新浪广告共享计划评论重要提示:警惕虚假中奖信息,点击查看详情免费任选1000款游戏新手卡[发评论]人月神话:2008-04-18 23:30:02评论测试!∙厚积薄发:2009-07-14 15:46:03数据假的啊根据Defect Density = 389 2.12RV 5.32DC – 24.1QC和各变量取值 DD最后结果肯定大于196∙厚积薄发:2009-07-14 15:54:09呵呵公式需要除以1000发评论你的Windows 7 你做主新浪产品部优厚待遇聘英才!。

crystalball软件介绍

crystalball软件介绍

Crystal Ball 介绍Crystal Ball(CB)是基于PC Windows平台而开发的简单且非常实用的风险分析和评估软件。

面向各类商务、科学和技术工程领域,用户界面友好,是基于图表进行预测和风险分析。

CB 在微软Excel 应用软件上运行,使用蒙特卡罗(Monte Carlo)模拟法对某个特定状况预测所有可能的结果,运用图表对分析进行总结,并显示每一个结果的概率。

除了描述统计量、趋势图和相关变量分配,CB还进行敏感性分析,让用户决定真正导致结果的因素。

如今 CB 已是全世界商业风险分析和决策评估软件中的佼佼者。

Crystal Ball专业版是市面上以Excel为本的风险分析及预测工具中最全面的套装软件。

其功能和特点不仅早已得到广大用户的认同,并获得许多正在考虑购买相关软件产品新用户的青睐和首选。

85%<<财富>>评出的全球500强大企业中早已有400家使用 Crystal Ball 软件作为他们进行商务决策,项目投资风险分析的工具。

再者,美国前50名最佳MBA 商学院,已有40所也用Crystal Ball作为教研和商业性课题的工具。

用户之一世界着名的哈佛大学商学院把 Crystal Ball 列为可用于计划金融的软件 (Project Finance Software)。

因为财政计划,金融投资方面的风险分析是CB 软件功能的一部分。

Crystal Ball之前是美国Decisioneering公司的产品,Decisioneering在2007年被Hyperion公司收购,Hyperion 公司之后又被Oracle收购,所以Crystal Ball目前的发行商是Oracle。

Crystal Ball的用途:DFSS,过程研究,过程优化,现有过程的模拟改变,公差分析,设计分析,原料筛选,容量设计,资源分配与存货优化,约束后的项目筛选,预防性维护优化,成本预算,可靠性分析,排队过程分析,建筑项目资金预算的偶然性分析,商业过程模拟,工程设计与预测,供求预测,制造供应链问题的减少与存货控制,新产品商品化的资金模型。

水晶球软件使用CrystalBall

水晶球软件使用CrystalBall
• This is in contrast to analytical methods, which obtain exact solutions to highly stylized problems
• Tradeoff between rigor and relevance
OPIM 5270 |Spring 2015
OPIM 5270 |Spring 2015
Possible Performance Measure Distributions Within a Range
worst case
best case worst case
best case
worst case
best case worst case
best case
• Simulation can be used to analyze these types of models
OPIM 5270 |Spring 2015
Random Variables & Risk
• A random variable is any variable whose value cannot be predicted or set with certainty.
OPIM 5270 |Spring 2015
Best-Case/Worst-Case Analysis
• Best case - plug in the most optimistic values for each of the uncertain cells.
• Worst cຫໍສະໝຸດ se - plug in the most pessimistic values for each of the uncertain cells.

Crystal Ball 项目风险分析评估工具

Crystal Ball 项目风险分析评估工具
CD-ROM drive
Video graphics adapter and monitor with at least 1024x768 resolution
Adobe Acrobat Reader 6.0 or later
Note: For Real Options Analysis Toolkit, Windows and Excel must be English versions and the Windows regional settings must be English.
Personal computer with Pentium-equivalent microprocessor (800 MHz or faster)
At least 512 MB of RAM
At least 88 MB of hard disk space for .NET Framework 2.0 and another 58 MB for .NET Framework 3.0 (if not already installed) and 91 MB for Crystal Ball 7.3.1. (Note: Each of those two components requires approximately twice the given amount of disk space during installation.)
Crystal Ball 7 Standard Edition is the easiest way to perform Monte Carlo simulations in your own spreadsheets. Crystal Ball automatically calculates thousands of different "what if" cases, saving the inputs and results of each calculation as individual scenarios. Analysis of these scenarios reveals to you the range of possible outcomes, their probability of occurring, which input has the most effect on your model and where you should focus your efforts.

CrystalBall风险分析蒙特卡洛模拟分析软件

CrystalBall风险分析蒙特卡洛模拟分析软件

CrystalBall风险分析蒙特卡洛模拟分析软件转换Microsoft Excel电⼦表格,获得可信的风险分析图,创建准确的预测模型,寻找最佳解决⽅案,最⼤限度的提⾼您所⾯临的风险。

Crystal Ball软件提供从蒙特卡洛模拟到预测和优化的功能。

Crystal Ball是⽯油、天然⽓和矿业公司分析电⼦表格模型中不确定性的⾏业标准软件。

Crystal Ball是在⾃⼰的电⼦表格中进⾏快速风险分析和优化的最简单⽅法。

使⽤⼀个集成的⼯具集,您可以使⽤您⾃⼰的历史数据来建⽴精确的模型,⾃动“what if”分析来理解潜在的不确定性的影响,并寻找最佳的解决⽅案或项⽬组合。

Oracle Crystal Ball是⽤于预测建模、预测、模拟和优化的,基于电⼦表格的主要应⽤程序。

它使您对影响风险的关键因素有⽆与伦⽐的洞察⼒。

使⽤Crystal Ball,即使在最不确定的市场条件下,您也能做出正确的战术决策以达到您的⽬标并获得竞争优势。

新功能⽀持Microsoft Excel 2016⽀持Microsoft Windows 10改进了预测功能Cell偏好功能增强附加语⾔本地化OptQues优化功能增强预测Damped趋势指数平滑技术Crystal Ball EPM整合战略财务Crystal Ball决策优化器与战略财务的整合选择分类对象基本功能增加风险计算的概率达到某⼀⽬标的可能性是什么?影响风险的关键因素是什么?对这些和其他常见的“what-if”⽅案的回答可以通过将概率分配给未知变量来确定。

Excel⽆法处理概率分析的复杂性,因此需要更好的⼯具—Crystal Ball。

Crystal Ball通过对每个不确定变量应⽤⼀系列的值或概率分布,使⽤蒙特卡洛模拟的繁琐的“what-if”过程⾃动化。

程序从定义的概率范围内⽣成随机值,然后重新计算模型成百上千次,保存每个“what-if”场景的结果。

这个节省时间的缓解⽅法,必须⼀次⼜⼀次⼿动输⼊不同的场景。

风险管理软件Crystal-Ball使用指导

风险管理软件Crystal-Ball使用指导

Monte-Carlo Simulation with Crystal Ball®To run a simulation using Crystal Ball®:1. Setup SpreadsheetBuild a spreadsheet that will calculate the performance measure (e.g., profit) in terms of the inputs (random or not). For random inputs, just enter any number.2. Define Assumptions—i.e., random variablesDefine which cells are random, and what distribution they should follow.3. Define Forecast—i.e., output or performance measureDefine which cell(s) you are interested in forecasting (typically the performance measure, e.g., profit).4. Choose Number of TrialsSelect the number of trials. If you would later like to generate the Sensitivity Analysis chart, choose “Sensitivity Analysis” under Options in Run Preferences.5. Run SimulationRun the simulation. If you would like to change parameters and re-run the simulation, you should “reset” the simulation (click on the “Reset Simulation” button on the toolbar or in the Run menu) first.6. View ResultsThe forecast window showing the results of the simulation appears automatically after (or during) the simulation. Many different results are available (frequency chart, cumulative chart, statistics, percentiles, sensitivity analysis, and trend chart). The results can be copied into the worksheet.Crystal Ball Toolbar:Define Define Run Start Reset Forecast Trend Assumptions Forecast Preferences Simulation Simulation Window ChartWalton Bookstore Simulation with Crystal Ball®Recall the Walton Bookstore example: It is August, and they must decide how many of next year’s nature calendars to order. Each calendar costs the bookstore $7.50 and is sold for $10. After February, all unsold calendars are returned to the publisher for a refund of $2.50 per calendar. Suppose Walton predicts demand will be somewhere between 100 and 300 (discrete uniform).Demand = d ~ Uniform[100, 300]Order Quantity = Q (decision variable)Revenue = $10 * Min(Q, d)Cost = $7.50 * QRefund = $2.50 * Max(Q–d, 0)Profit = Revenue – Cost + RefundStep #1 (Setup Spreadsheet)Walton Bookstore Simulation with Crystal Ball ®Step #2 (Define Assumptions —i.e., random variables)—color code (blue):and click on the “Define Assumptions” button in toolbar (or in the Cell menu):Select type of distribution:Provide parameters of distributions:Walton Bookstore Simulation with Crystal Ball®Step #3 (Define Forecast—i.e., output)click on the “Define Forecast” button in toolbar (or in the Cell menu),and fill in the Define Forecast dialogue box.Step #4 (Choose Number of Trials)Click on the “Run Preferences” button in toolbar (or in the Run menu):and select the number of trials to run.Walton Bookstore Simulation with Crystal Ball®Step #5 (Run Simulation)Click on the “Start Simulation” button in toolbar (or Run in the Run menu):Step #6 (View Results)The results of the simulation can be viewed in a variety of different ways (frequency chart, cumulative chart, statistics, and percentiles). Choose different options under the View menuin the forecast window.The results can be copied into a worksheet or Word document (choose Copy under the Edit menu in the simulation output window.Using Trend Charts to Find the Impact of Order Quantityon Potential ProfitDefine several forecast cells (G14:G18) for several possible order quantities (Q=100, 150, 200, 250, 300). Use the same random order quantity for each to compare them more equally (i.e., one assumption cell for demand—C14—with the rest set equal to C14).After running the simulation, choose “Open Trend Chart” in the Run menu. This chart gives “certainty bands” for the forecast cells. 10% of the time, the project duration will fall within the inner band (light blue), 25% of the time within the 2nd band (red), 50% of the time within the third band (green), and 90% of the time within the outside band (dark blue).Project Management—Global OilGlobal Oil is planning to move their credit card operation to Des Moines, Iowa from their home office in Dallas. The move involves many different divisions within the company. Real estate must select one of three available office sites. Personnel has to determine which employees from Dallas will move, how many new employees to hire, and who will train them. The systems group and treasurer’s office must organize the new operating procedure and make financial arrangements. The architects will have to design the interior space, and oversee needed structural improvements. Each site is an existing building with sufficient open space, but office partitions, computer facilities, furnishings, and so on, must all be provided.A complicating factor is that there is an interdependence of activities. In other words, some parts of the project cannot be started until other parts are completed. For example, Global cannot construct the interior of an office before it has been designed. Neither can it hire new employees until it has determined its personnel requirements.The necessary activities and their necessary predecessors (due to interdependence) are listed below. Three estimates are made for the completion time of each activity—the minimum time, most likely time, and maximum time.Start EndGlobal Oil Simulation with Crystal Ball®Step #1 (Setup Spreadsheet)Step #2 (Define Assumptions—i.e., random variables)Each of the random activity times (B, C, D, E, G, and I) is assumed to follow the triangular distribution.Global Oil Simulation with Crystal Ball®Step #3 (Define Forecast—i.e., output)Cell J15 is the forecast cell:Step #4 (Choose Number of Trials)500 trials were run. In addition, Sensitivity Analysis was enabled in the Options of the Run Preferences dialogue box. This allows for the generation of sensitivity analysis results later.Step #5 (Run Simulation)Step #6 (View Results)Additional Results Available with Crystal Ball®Slide the triangles below the histograms to determine the probability that the output (project duration) is less than a certain value (e.g., a deadline), greater than a certain value, or between any two values (by sliding both triangles).Alternatively, you can type in values for the lower bound or upper bound to determine the probability. You can also type in a probability (in “Certainty”), and it will determine the range that has that probability.There is a 79% chance the project will be completed within 150 days.There is a 2.4% chance that the project will take more than 160 days.Sensitivity ChartChoose “Open Sensitivity Chart” in the R un menu. Note that this chart is only available ifyou selected the “Sensitivity Analysis” option under Run Preferences. This chart gives an indication as to which random variables (activity times) have the greatest impact on the output cell (project completion time).Variability in activity E has the greatest impact on overall project duration, followed by activity D, C, I, and B. Variability in activity G has almost no impact.Fitting a DistributionCrystal Ball can be used to “fit” a distribution t o data.The following data has been collected for the previous 100 phone calls to a mail-order house:(80 rows have been hidden)Fitting Data to a DistributionUsing Crystal Ball® to fit data to a distribution1. Select a spreadsheet cell.2. Choose Define Assumption.3. Click the Fit button, then select the source of the fitted data.4. Click the Next button, then select the distributions to try to fit.5. Click OK.Interarrival TimeService Time。

Crystal_Ball_蒙塔卡洛模拟教程

Crystal_Ball_蒙塔卡洛模拟教程

13-4
報童佛萊迪
➢ 佛莱迪在某大城市里主要市区经营一家报摊。
➢ 佛莱迪贩售各类的报纸和杂志,其中最贵的报纸为财经日报 。 ➢ 财经日报相关的成本资料: 每份报纸的成本为1.50美元 每份报纸的售价为2.50美元 没售出的报纸,每份报纸可以获得0.50美元的偿还金 ➢ 财经日报的销售资料: 佛莱迪每天的销售量介于40到70份之间。 销售数量介于40到70份之间任何数值的频率相同。
© The McGraw-Hill Companies, Inc., 2009
13-19
准确度控制:扩充的定义预测对话方块
© The McGraw-Hill Companies, Inc., 2009
13-20
準確度控制的結果
1,000 次試驗得出有95%信賴區間低於1美元。
© The McGraw-Hill Companies, Inc., 2009
© The McGraw-Hill Companies, Inc., 2009
13-15
佛萊迪利潤的頻率圖
© The McGraw-Hill Companies, Inc., 2009
13-16
佛萊迪利潤更多的結果
© The McGraw-Hill Companies, Inc., 2009
Certainty 栏位显示佛萊迪的模拟实验中
– 竞争者 2 则设定 25% 的边际利润以及他在估算计画成本时会比 竞争者 1 来得准确;但是根据过去的竞标经验,他的边际利润也 有可能在至多正负15% 间移动。
– 竞争者 3 估算计画成本极为精准,将其边际利润设在介于 20% 与30% 之间的任一数字。
問題:信用公司對於這個計畫的投資金額應該是多少?

Crystal Ball开发人员指南说明书

Crystal Ball开发人员指南说明书

R E L E A S E11.1.1.3D E V E L O P E R'S G U I D ECrystal Ball Developer's Guide, 11.1.1.3Copyright © 1988, 2009, Oracle and/or its affiliates. All rights reserved.Authors: EPM Information Development TeamThe Programs (which include both the software and documentation) contain proprietary information; they are provided under a license agreement containing restrictions on use and disclosure and are also protected by copyright, patent, and other intellectual and industrial property laws. Reverse engineering, disassembly, or decompilation of the Programs, except to the extent required to obtain interoperability with other independently created software or as specified by law, is prohibited.The information contained in this document is subject to change without notice. If you find any problems in the documentation, please report them to us in writing. This document is not warranted to be error-free. Except as may be expressly permitted in your license agreement for these Programs, no part of these Programs may be reproduced or transmitted in any form or by any means, electronic or mechanical, for any purpose.If the Programs are delivered to the United States Government or anyone licensing or using the Programs on behalf of the United States Government, the following notice is applicable:U.S. GOVERNMENT RIGHTS Programs, software, databases, and related documentation and technical data delivered to U.S. Government customers are "commercial computer software" or "commercial technical data" pursuant to the applicable Federal Acquisition Regulation and agency-specific supplemental regulations. As such, use, duplication, disclosure, modification, and adaptation of the Programs, including documentation and technical data, shall be subject to the licensing restrictions set forth in the applicable Oracle license agreement, and, to the extent applicable, the additional rights set forth in FAR 52.227-19, Commercial Computer Software--Restricted Rights (June 1987). Oracle USA, Inc., 500 Oracle Parkway, Redwood City, CA 94065.The Programs are not intended for use in any nuclear, aviation, mass transit, medical, or other inherently dangerous applications. It shall be the licensee's responsibility to take all appropriate fail-safe, backup, redundancy and other measures to ensure the safe use of such applications if the Programs are used for such purposes, and we disclaim liability for any damages caused by such use of the Programs.Oracle, JD Edwards, PeopleSoft, and Siebel are registered trademarks of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners.The Programs may provide links to Web sites and access to content, products, and services from third parties. Oracle is not responsible for the availability of, or any content provided on, third-party Web sites. You bear all risks associated with the use of such content. If you choose to purchase any products or services from a third party, the relationship is directly between you and the third party. Oracle is not responsible for: (a) the quality of third-party products or services; or (b) fulfilling any of the terms of the agreement with the third party, including delivery of products or services and warranty obligations related to purchased products or services. Oracle is not responsible for any loss or damage of any sort that you may incur from dealing with any third party.ContentsChapter 1. Welcome (19)About the Oracle Crystal Ball Developer Kit (19)Who Should Use the Crystal Ball Developer Kit (20)What You Will Need (20)How This Manual is Organized (20)Documentation Changes (21)Technical Support and More (21)Chapter 2. Crystal Ball Developer Kit Overview (23)Introduction (23)How to Use the Crystal Ball Developer Kit (24)Calling Crystal Ball From Visual Basic For Applications (VBA) Programs (24)Calling Crystal Ball From an External Visual Basic (VB) Program (25)Creating an Excel Add-in (26)Using Developer Kit Macro Calls in User-defined Macros (26)A Note About Defaults and Write-Protection (26)Putting Custom Applications into Runtime Mode (26)Alphabetic List of Crystal Ball Macro Calls (27)Functions For Use in Excel Models (32)Opening and Closing Crystal Ball (32)Setting Up and Running Simulations (33)Controlling Crystal Ball Chart Windows (34)Managing Charts (35)Handling Crystal Ball Results (35)Setting and Getting Preferences (36)Crystal Ball Tools (37)Special Calls (37)Chapter 3. Crystal Ball Macro Calls (39)Introduction (42)CB.AboutBox (42)CB.AboutBox Example (42)Contents iiiCB.AlertOnArgumentError (42)CB.AlertOnArgumentError Example (43)CB.AlertOnArgumentError Related Calls (43)CB.AlertOnMacroResultError (43)CB.AlertOnMacroResultError Example (43)CB.AlertOnMacroResultError Related Calls (43)CB.AlertOnObsolete (43)CB.AlertOnObsolete Example (44)CB.AlertOnObsolete Related Calls (44)CB.AssumPrefsND (44)CB.AssumPrefsND Example (45)CB.AutoDownshift (45)CB.AutoDownshift Example 1 (45)CB.AutoDownshift Example 2 (46)CB.BatchFit (46)CB.BatchFit Example (46)CB.BatchFit Related Calls (46)CB.BatchFitND (46)CB.BatchFitND Example 1 (54)CB.BatchFitND Example 2 (55)CB.BatchFitND Related Calls (55)CB.Bootstrap (55)CB.Bootstrap Example (56)CB.Bootstrap Related Calls (56)CB.BootstrapND (56)CB.BootstrapND Example 1 (59)CB.BootstrapND Example 2 (59)CB.BootstrapND Related Calls (59)CB.CBLoaded (59)CB.CBLoaded Example (60)CB.CBLoaded Related Calls (60)CB.CellPrefs (60)CB.CellPrefs Example (60)CB.CellPrefs Related Calls (60)CB.CellPrefsND (61)CB.CellPrefsND Example (63)CB.CellPrefsND Related Calls (63)CB.ChartPrefs (63)CB.ChartPrefs Example (64)iv ContentsCB.ChartPrefs Related Calls (64)CB.ChartPrefsND (64)CB.ChartPrefsND Example (67)CB.ChartPrefsND Related Calls (67)CB.CheckData (67)CB.CheckData Example (67)CB.CheckData Related Calls (68)CB.CheckDataND (68)CB.CheckDataND Example (68)CB.CheckDataND Related Calls (69)CB.ClearData (69)CB.ClearData Example (69)CB.ClearData Related Calls (69)CB.ClearDataND (70)CB.ClearDataND Example (70)CB.ClearDataND Related Calls (70)CB.CloseAllCharts (70)CB.CloseAllCharts Example (70)CB.CloseAllCharts Related Calls (71)CB.CloseChart (71)CB.CloseChart Example (71)CB.CloseChart Related Calls (71)CB.CloseFore (72)CB.CloseFore Example (72)CB.CloseFore Related Calls (72)CB.CloseSensitiv (72)CB.CloseSensitiv Example (72)CB.CloseSensitiv Related Calls (73)CB.CloseTrend (73)CB.CloseTrend Example (73)CB.CloseTrend Related Calls (73)CB.CopyData (74)CB.CopyData Example (74)CB.CopyData Related Calls (74)CB.CopyDataND (74)CB.CopyDataND Example (75)CB.CopyDataND Related Calls (75)CB.CopyScatter (75)CB.CopyScatter Example (75)Contents vCB.CopyScatter Related Calls (76)CB.CopySensitiv (76)CB.CopySensitiv Example (76)CB.CopySensitiv Related Calls (76)CB.CopyTrend (76)CB.CopyTrend Example (77)CB.CopyTrend Related Calls (77)CB.CorrelateND (77)CB.CorrelateND Example 1 (78)CB.CorrelateND Example 2 (78)CB.CorrelateND Example 3 (78)CB.CorrelateND Related Calls (78)CB.CreateChart (79)CB.CreateChart Example (79)CB.CreateChart Related Calls (79)CB.CreateRpt (80)CB.CreateRpt Example (80)CB.CreateRpt Related Calls (80)CB.CreateRptND (80)CB.CreateRptND Example 1 (89)CB.CreateRptND Example 2 (90)CB.CreateRptND Related Calls (90)CB.DataAnalysis (91)CB.DataAnalysis Example (91)CB.DataAnalysis Related Calls (91)CB.DataAnalysisND (91)CB.DataAnalysisND Example (95)CB.DataAnalysisND Related Calls (96)CB.DecisionTable (96)CB.DecisionTable Example (96)CB.DecisionTable Related Calls (96)CB.DecisionTableND (96)CB.DecisionTableND Example (98)CB.DecisionTableND Related Calls (99)CB.DefineAltParms (99)CB.DefineAltParms Example 1 (101)CB.DefineAltParms Example 2 (102)CB.DefineAltParms Example 3 (102)CB.DefineAltParms Related Calls (102)vi ContentsCB.DefineAssum (102)CB.DefineAssum Example 1 (103)CB.DefineAssum Example 2 (103)CB.DefineAssum Related Calls (103)CB.DefineAssumND (103)CB.DefineAssumND Example 1 (107)CB.DefineAssumND Example 2 (107)Defining Custom Distributions (107)CB.DefineAssumND Custom Distribution Example (108)CB.DefineAssumND Related Calls (108)CB.DefineDecVar (108)CB.DefineDecVar Example (108)CB.DefineDecVar Related Calls (109)CB.DefineDecVarND (109)CB.DefineDecVarND Example 1 (111)CB.DefineDecVarND Example 2 (111)CB.DefineDecVarND Example 3 (111)CB.DefineDecVarND Example 4 (111)CB.DefineDecVarND Example 5 (112)CB.DefineDecVarND Related Calls (112)CB.DefineFore (112)CB.DefineFore Example (113)CB.DefineFore Related Calls (113)CB.DefineForeND (113)CB.DefineForeND Example (114)CB.DefineForeND Related Calls (114)CB.DeleteChart (115)CB.DeleteChart Example (115)CB.DeleteChart Related Calls (115)CB.EnumAssum (115)CB.EnumAssum Example (116)CB.EnumAssum Related Calls (116)CB.EnumChart (117)CB.EnumChart Example (117)CB.EnumChart Related Calls (118)CB.EnumCorrelation (118)CB.EnumCorrelation Example 1 (119)CB.EnumCorrelation Example 2 (119)CB.EnumCorrelation Related Calls (120)Contents viiCB.EnumDecVar (120)CB.EnumDecVar Example (120)CB.EnumDecVar Related Calls (121)CB.EnumFore (121)CB.EnumFore Example (121)CB.EnumFore Related Calls (122)CB.ExtractData (122)CB.ExtractData Example (122)CB.ExtractData Related Calls (123)CB.ExtractDataND (123)CB.ExtractDataND Example 1 (130)CB.ExtractDataND Example 2 (130)CB.ExtractDataND Related Calls (130)CB.Fit (131)CB.Fit Example 1 (134)CB.Fit Example 2 (134)CB.Fit Related Calls (134)CB.FormatPrefs (135)CB.FormatPrefs Example (135)CB.FormatPrefs Related Calls (135)CB.FormatPrefsND (135)CB.FormatPrefsND Example 1 (137)CB.FormatPrefsND Example 2 (137)CB.FormatPrefsND Related Calls (138)CB.Freeze (138)CB.Freeze Example (138)CB.Freeze Related Calls (138)CB.FreezeND (138)CB.FreezeND Example (140)CB.FreezeND Related Calls (140)CB.GetAssum (140)CB.GetAssum Example 1 (142)CB.GetAssum Example 2 (142)CB.GetAssum Related Calls (142)CB.GetAssumPercent (143)CB.GetAssumPercent Example 1 (143)CB.GetAssumPercent Example 2 (144)CB.GetAssumPercent Related Calls (144)CB.GetBatchFitOption (144)viii ContentsCB.GetBatchFitOption Example 1 (148)CB.GetBatchFitOption Example 2 (148)CB.GetBatchFitOption Related Calls (148)CB.GetBootstrapOption (148)CB.GetBootstrapOption Example 1 (150)CB.GetBootstrapOption Example 2 (150)CB.GetBootstrapOption Related Calls (150)CB.GetCBAutoLoad (151)CB.GetCBAutoLoad Example (151)CB.GetCBAutoLoad Related Calls (151)CB.GetCertainty (151)CB.GetCertainty Example 1 (152)CB.GetCertainty Example 2 (152)CB.GetCertainty Related Calls (153)CB.GetCorrelation (153)CB.GetCorrelation Example (153)CB.GetCorrelation Related Calls (154)CB.GetDataAnalysisOption (154)CB.GetDataAnalysisOption Example 1 (156)CB.GetDataAnalysisOption Example 2 (156)CB.GetDataAnalysisOption Related Calls (156)CB.GetDecisionTableOption (156)CB.GetDecisionTableOption Example (158)CB.GetDecisionTableOption Related Calls (158)CB.GetDecVar (158)CB.GetDecVar Example (159)CB.GetDecVar Related Calls (160)CB.GetExcel2007ForegroundMode (160)CB.GetExcel2007ForegroundMode Example (160)CB.GetExcel2007ForegroundMode Related Calls (160)CB.GetFitParm (160)CB.GetFitParm Example (162)CB.GetFitParm Related Calls (162)CB.GetFore (162)CB.GetFore Example (164)CB.GetFore Related Calls (165)CB.GetForeData (165)CB.GetForeData Example 1 (165)CB.GetForeData Example 2 (166)Contents ixCB.GetForePercent (166)CB.GetForePercent Example 1 (166)CB.GetForePercent Example 2 (167)CB.GetForePercent Related Calls (167)CB.GetForeStat (167)CB.GetForeStat Example 1 (169)CB.GetForeStat Example 2 (169)CB.GetForeStat Related Calls (169)CB.GetLockFitParm (170)CB.GetLockFitParm Example (171)CB.GetLockFitParm Related Calls (171)CB.GetRunPrefs (172)CB.GetRunPrefs Example 1 (172)CB.GetRunPrefs Example 2 (172)CB.GetRunPrefs Related Calls (172)CB.GetTwoDSimulationOption (173)CB.GetTwoDSimulationOption Example 1 (176)CB.GetTwoDSimulationOption Example 2 (176)CB.GetTwoDSimulationOption Related Calls (176)CB.GetVersion (176)CB.GetVersion Example (177)CB.GetVersion Related Calls (178)CB.GetWorksheetVersion (178)CB.GetWorksheetVersion Example (178)CB.GetWorksheetVersion Related Calls (179)CB.IsCBObject (179)CB.IsCBObject Example (179)CB.IsCBObject Related Calls (180)CB.Iterations (180)CB.Iterations Example 1 (180)CB.Iterations Example 2 (180)CB.Iterations Related Call (180)CB.LockFitParm (181)CB.LockFitParm Example (182)CB.LockFitParm Related Calls (182)CB.MacroResult (182)CB.MacroResult Example (183)CB.MacroResult Related Call (183)CB.MacroResultDetail (184)x ContentsCB.MacroResultDetail Example (185)CB.MacroResultDetail Related Call (186)CB.OpenChart (186)CB.OpenChart Example 1 (187)CB.OpenChart Example 2 (187)CB.OpenChart Related Calls (187)CB.OpenFore (187)CB.OpenFore Example (188)CB.OpenFore Related Calls (188)CB.OpenSelection (188)CB.OpenSelection Example (188)CB.OpenSelection Related Calls (188)CB.OpenSensitiv (189)CB.OpenSensitiv Example (189)CB.OpenSensitiv Related Calls (189)CB.OpenTrend (189)CB.OpenTrend Example (190)CB.OpenTrend Related Calls (190)CB.PasteData (190)CB.PasteData Example 1 (190)CB.PasteData Example 2 (191)CB.PasteData Example 3 (191)CB.PasteData Related Calls (191)CB.Reset (191)CB.Reset Example (192)CB.Reset Related Calls (192)CB.ResetND (192)CB.ResetND Example (192)CB.ResetND Related Calls (192)CB.RestoreResults (193)CB.RestoreResults Example (193)CB.RestoreResults Related Calls (193)CB.RestoreResultsND (193)CB.RestoreResultsND Example (194)CB.RestoreResultsND Related Calls (194)CB.RunPrefs (194)CB.RunPrefs Example (194)CB.RunPrefs Related Calls (195)CB.RunPrefsND (195)Contents xiCB.RunPrefsND Example (199)CB.RunPrefsND Related Calls (200)CB.RuntimeMode (200)CB.RuntimeMode Example (200)CB.RuntimeMode Related Call (201)CB.SaveResults (201)CB.SaveResults Example (201)CB.SaveResults Related Calls (201)CB.SaveResultsND (202)CB.SaveResultsND Example (202)CB.SaveResultsND Related Calls (202)CB.ScatterPrefs (202)CB.ScatterPrefs Example (203)CB.ScatterPrefs Related Call (203)CB.ScatterPrefsND (203)CB.ScatterPrefsND Example (206)CB.ScatterPrefsND Related Call (207)CB.SelectAssum (207)CB.SelectAssum Example (207)CB.SelectAssum Related Calls (208)CB.SelectChart (208)CB.SelectChart Example (208)CB.SelectChart Related Calls (208)CB.SelectDecVar (209)CB.SelectDecVar Example (209)CB.SelectDecVar Related Calls (209)CB.SelectFore (209)CB.SelectFore Example (209)CB.SelectFore Related Calls (210)CB.SensPrefs (210)CB.SensPrefs Example (210)CB.SensPrefs Related Call (210)CB.SensPrefsND (210)CB.SensPrefsND Example (212)CB.SensPrefsND Related Call (213)CB.SetAssum (213)CB.SetAssum Example (214)CB.SetAssum Related Calls (214)CB.SetCBAutoLoad (214)xii ContentsCB.SetCBAutoLoad Example (215)CB.SetCBAutoLoad Related Calls (215)CB.SetCBWorkbookPriority (215)CB.SetCBWorkbookPriority Example (215)CB.SetDecVar (216)CB.SetDecVar Example 1 (217)CB.SetDecVar Example 2 (217)CB.SetDecVar Related Calls (218)CB.SetExcel2007ForegroundMode (218)CB.SetExcel2007ForegroundMode Example (218)CB.SetExcel2007ForegroundMode Related Call (219)CB.SetFitRange (219)CB.SetFitRange Examples (219)CB.SetFitRange Related Call (219)CB.SetFore (219)CB.SetFore Example 1 (223)CB.SetFore Example 2 (223)CB.SetFore Related Calls (223)CB.SetRange (223)CB.SetRange Example 1 (225)CB.SetRange Example 2 (225)CB.SetRange Related Call (225)CB.Shutdown (225)CB.Shutdown Example (225)CB.Shutdown Related Calls (225)CB.SimResult (226)CB.SimResult Example (226)CB.SimResult Related Calls (226)CB.Simulation (226)CB.Simulation Example 1 (228)CB.Simulation Example 2 (228)CB.Simulation Related Calls (228)CB.SingleStep (229)CB.SingleStep Example (229)CB.SingleStep Related Call (229)CB.StartMultiSimul (229)CB.StartMultiSimul Example (230)CB.StartMultiSimul Related Calls (230)CB.Startup (230)Contents xiiiCB.Startup Example (231)CB.Startup Related Calls (231)CB.StopMultiSimul (231)CB.StopMultiSimul Related Calls (231)CB.TrendPrefs (231)CB.TrendPrefs Example (232)CB.TrendPrefs Related Calls (232)CB.TrendPrefsND (232)CB.TrendPrefsND Example (235)CB.TrendPrefsND Related Call (235)CB.TwoDSimulation (236)CB.TwoDSimulation Example (236)CB.TwoDSimulation Related Calls (236)CB.TwoDSimulationND (236)CB.TwoDSimulationND Example 1 (239)CB.TwoDSimulationND Example 2 (240)CB.TwoDSimulationND Related Calls (240)CB.WorksheetProtection (241)CB.WorksheetProtection Example 1 (242)CB.WorksheetProtection Example 2 (242)CB.WorksheetProtection Example 3 (242)Chapter 4. Changes from Previous Versions (245)Introduction (245)Added in Crystal Ball 11.1.1.0.00 (245)Added in Crystal Ball 7.1 - 7.3.x (246)Not Included in This Version (247)Changes to Existing Calls (249)CB.ND (249)CB.AutoDownshift (249)CB.CellPrefsND (249)CB.ChartPrefsND (250)CB.CheckData (250)CB.ClearData (250)CB.ClearDataND (250)CB.CloseFore (250)CB.CloseSensitiv (250)CB.CloseTrend (250)CB.CopyData and CB.CopyDataND (251)xiv ContentsCB.CorrelateND (251)CB.CreateRpt (251)CB.CreateRptND (251)CB.DefineAltParms (252)CB.DefineAssum (253)CB.DefineAssumND (253)CB.DefineDecVar (253)CB.DefineDecVarND (254)CB.DefineForeND (254)CB.EnumAssum (254)CB.EnumDecVar (254)CB.EnumFore (254)CB.ExtractDataND (254)CB.Fit (255)CB.Freeze and CB.FreezeND (256)CB.GetAssum (256)CB.GetAssumPercent (256)CB.GetCertainty (256)CB.GetCorrelation (256)CB.GetDecVar (256)CB.GetFitParm (257)CB.GetFore (257)CB.GetForeStat (257)CB.GetRunPrefs (257)CB.GetVersion, CB.GetWorksheetVersion (258)CB.IsCBObject (258)CB.OpenSensitiv (258)CB.OpenTrend (258)CB.PasteData (258)CB.RunPrefsND (258)CB.SensPrefsND (259)CB.SetAssum (259)CB.SetDecVar (259)CB.SetFore (260)CB.SimResult (260)CB.Simulation (260)CB.StartMultiSimul (260)CB.TrendPrefsND (261)Other Changes (261)Contents xvCharts Module (261)Chapter 5. Crystal Ball Runtime (263)Introduction (263)About Crystal Ball Runtime (263)Runtime Example Workbook (263)Delivering Crystal Ball Runtime Applications (264)Installation Script (264)System Requirements and .NET (265)Licensing Script (265)Startup Scripts (266)Installing Crystal Ball Runtime (266)Crystal Ball Runtime Licensing Requirements (267)Appendix A. Using the OptQuest Developer Kit (269)About the OptQuest Developer Kit (269)Who Should Use This Kit (269)What This Kit Includes (270)What You Will Need (270)OptQuest Developer Kit Use and Structure (270)Specific Requirements for Use (270)OptQuest Developer Kit Namespace (271)Important OptQuest Classes (271)Developing Optimization Code (274)Development Environment (274)Development Resources (274)Coding an Optimization (277)User-defined Event Macros for Optimizations (279)User-defined Event Macro Names (279)Using Events in VBA (280)Event Signatures (281)Constraints and Macros (283)Global Macros (283)Appendix B. Using the Predictor Developer Kit (285)About the Predictor Developer Kit (285)Who Should Use This Kit (286)What This Kit Includes (286)Developer Kit Use and Structure (286)Specific Requirements for Use (286)xvi ContentsPredictor Developer Kit Namespace (287)Important Predictor Classes (287)Developing Time-Series Forecasting Code (290)Index (293)Contents xviixviii ContentsIn This ChapterAbout the Oracle Crystal Ball Developer Kit (19)Who Should Use the Crystal Ball Developer Kit (20)What You Will Need (20)How This Manual is Organized (20)Documentation Changes (21)Technical Support and More (21)About the Oracle Crystal Ball Developer KitWelcome to the Developer Kit for Oracle Crystal Ball, Fusion Edition.Using the Crystal Ball Developer Kit, you can automate and control Crystal Ball simulationsfrom within a Visual Basic for Applications (VBA) program. This opens up a whole range ofpossibilities:l Running multiple simulations to test different sets of assumptions automaticallyl Integrating Crystal Ball with other software toolsl Creating turnkey applications that shield users from program intricaciesl Building custom reports or automate post-simulation analysisl Setting up specialized simulation environmentsThe Developer Kit provides a link between Crystal Ball and your application. It consists of alibrary of macro calls (subroutines and functions) that control many aspects of Crystal Ball. Eachcopy of Crystal Ball comes enabled to use the Developer Kit, so that programs you develop todaycan be run by other users as well.This kit is the key that unlocks the programmability of Crystal Ball and guides you through themany calls available. In addition to the descriptions of the calls, or subroutines and functions,this manual contains examples that illustrate usage of the Developer Kit in several practicalapplications. You are encouraged to study these examples before starting out on your ownapplications. Should you need additional help, technical support is available with appropriatelicenses.If you have Oracle Crystal Ball Decision Optimizer, Fusion Edition, Appendix A, “Using theOptQuest Developer Kit,” describes how to automate OptQuest optimizations.About the Oracle Crystal Ball Developer Kit19See Appendix B, “Using the Predictor Developer Kit,” for information about automating andcontrolling Predictor forecasting.Note:The Predictor Developer Kit described in this Developer's Guide is completely rewritten.Code written for CB Predictor in Crystal Ball versions earlier than 11.1.1.3.00 is notcompatible with the current version of Predictor or this Predictor Developer Kit.Who Should Use the Crystal Ball Developer KitThe Crystal Ball Developer Kit is appropriate for advanced users who want to automate repetitivespreadsheet analysis. This manual assumes that readers are familiar with Visual Basic forApplications and Crystal Ball.What You Will NeedCrystal Ball runs on several versions of Microsoft Windows and Microsoft Excel. For a completelist of required hardware and software, see the Oracle Crystal Ball Installation and LicensingGuide.How This Manual is OrganizedThis manual contains descriptions of the Crystal Ball Developer Kit macro calls. It also discussesthe COM Developer Kit for OptQuest, Predictor, and Oracle Hyperion Smart View for Office,Fusion Edition integration.Each macro description includes a list of parameters and an example of the use of the relevantcalls.The manual includes the following additional chapters:l Chapter 2, “Crystal Ball Developer Kit Overview”Describes how to use the Crystal Ball Developer Kit and contains an alphabetical list of allCrystal Ball Developer Kit calls with summaries, plus tables of related calls.l Chapter 3, “Crystal Ball Macro Calls”Includes descriptions of all Crystal Ball Developer Kit calls in alphabetical order, withexamples.l Chapter 4, “Changes from Previous Versions”Information about changes since previous releases of Crystal Ball.l Chapter 5, “Crystal Ball Runtime”Information about creating applications for people who are not users of Crystal Ball.l Appendix A, “Using the OptQuest Developer Kit”20WelcomeDescribes how to use the Crystal Ball Decision Optimizer OptQuest Developer Kit toautomate OptQuest optimizations.l Appendix B, “Using the Predictor Developer Kit”Describes how to use the Predictor Developer Kit, included with all versions of Crystal Ball,to automate Predictor time-series forecasts.Documentation ChangesFor greater consistency in terminology between the Crystal Ball Developer Kit and VBA:l The term "macro" describes a sequence of VBA code created using the Crystal Ball Developer Kit.l The term "function" describes a Developer Kit element that returns a value. For example, the CB.GetCertainty function returns the probability of reaching the specified certaintyvalue.l The term "subroutine" describes a Developer Kit element that does not return a value — for example, CB.AboutBox.l The term "call" or "macro call" is used generically to describe any Developer Kit function or subroutine — for example, "The next section describes new Crystal Ball Developer Kit calls."In this version of the Crystal Ball Developer Kit, all macro calls are listed together in alphabeticalorder in Chapter 3. For lists of macro calls grouped by functionality, see Chapter 2.For information on how the Developer Kit calls have changed since the 2000.5 (5.5) version, seeChapter 4, “Changes from Previous Versions”.Technical Support and MoreOracle offers a variety of resources to help you use Crystal Ball, such as technical support,training, and other services. For information, see:/crystalballDocumentation Changes2122WelcomeIn This ChapterIntroduction (23)How to Use the Crystal Ball Developer Kit (24)Alphabetic List of Crystal Ball Macro Calls (27)Functions For Use in Excel Models (32)Opening and Closing Crystal Ball (32)Setting Up and Running Simulations (33)Controlling Crystal Ball Chart Windows (34)Managing Charts (35)Handling Crystal Ball Results (35)Setting and Getting Preferences (36)Crystal Ball Tools (37)Special Calls (37)IntroductionThis chapter tells how to use the Crystal Ball Developer Kit and provides lists of macro calls(subroutines and functions) from different categories with references to Chapter 3 for detaileddefinitions and examples.The chapter begins with instructions for using the Crystal Ball Developer Kit, followed by analphabetical list of the Crystal Ball calls, including a brief summary of the actions they perform.This section serves as an index to the Crystal Ball calls in Chapter 3.The following sections list groups of macro calls used for various purposes:l“Functions For Use in Excel Models” on page 32l“Opening and Closing Crystal Ball” on page 32l“Setting Up and Running Simulations” on page 33l“Controlling Crystal Ball Chart Windows” on page 34l“Handling Crystal Ball Results” on page 35l“Setting and Getting Preferences” on page 36l“Special Calls” on page 37Introduction23。

crystal_ball 模拟基础教程

crystal_ball 模拟基础教程

13-8
Crystal Ball 分配图库
13-9
Crystal Ball 均匀分配对话框
13-10
步骤 2:定义输出栏来作预测
■ Crystal Ball将计算机仿真的输出称之为预测(forecast),因为它正是
预测真正系统(即将仿真的系统)运作时绩效的机率分配。 ■ 每一个被计算机仿真用来预测绩效衡量的输出字段称为预测字段
13-11
Crystal Ball定义预测的对话框
13-12
步骤 3:设定执行偏好
■ 设定执行偏好就是要决定执行试验的次数, 并且决定如何执行计算机仿真的其他选项。
■ 一 开 始 , 我 们 点 选 「 Crystal Ball 」 标 签 (Excel 2007)或是工具栏(Excel较早版 本)上的「Run Preferences」(执行偏好) 按钮。
Certainty 字段显示佛莱迪的仿真试验中 有 65.80% 所得到的利润值 ≥ $40
13-18
模拟结果的准确度如何?
■ 仿真所提供的一项重要数据为平均利润 $45.94。
■ 这个样本平均值提供了此分配真实平均值 (true mean)的估计值(estimate)。真实 的平均值可能和$45.94有点误差。
13-4
报童佛莱迪
■ 佛莱迪在某大城市里主要市区经营一家报摊。 ■ 佛莱迪贩卖各类的报纸和杂志,其中最贵的
报纸为财经日报 。 ■ 财经日报相关的成本资料:
● 每份报纸的成本为1.50美元 ● 每份报纸的售价为2.50美元 ● 没售出的报纸,每份报纸可以获得0.50美元的偿
还金
■ 财经日报的销售资料:
13-5
运用仿真之电子表格模式
13-6

crystal ball使用指导

crystal ball使用指导

crystal ball使用指导Crystal Ball使用指导导言:Crystal Ball是一款用于预测和分析风险的软件工具,它可以帮助企业和组织做出明智的决策。

本文将介绍如何使用Crystal Ball进行预测和分析,以及一些注意事项和技巧。

一、Crystal Ball简介Crystal Ball是由Oracle公司开发的一款风险分析软件,它基于蒙特卡罗模拟方法,可以通过模拟大量的随机变量来预测未来的风险和收益。

Crystal Ball可以用于各种决策问题,如项目管理、投资分析、供应链优化等,帮助用户做出更准确的决策。

二、Crystal Ball的使用步骤1. 数据输入:首先,我们需要将相关的数据输入到Crystal Ball 中。

可以直接在Crystal Ball中输入数据,也可以从外部文件导入数据。

在输入数据时,需要注意数据的格式和准确性。

2. 模型建立:在输入数据之后,我们需要建立相应的模型。

模型可以是简单的数学模型,也可以是复杂的模拟模型。

在建立模型时,需要考虑到各种变量之间的关系,并进行合理的假设和参数设定。

3. 分布设定:Crystal Ball中的随机变量需要设定相应的概率分布。

可以选择常见的分布,如正态分布、均匀分布等,也可以根据实际情况自定义分布。

在设定分布时,需要根据实际数据和经验进行合理的选择。

4. 模拟运行:一切准备就绪后,我们可以进行模拟运行。

Crystal Ball会根据设定的分布和模型进行大量的随机模拟,得到未来可能的结果。

可以设定模拟的次数,以增加结果的准确性。

5. 结果分析:模拟运行完成后,Crystal Ball会生成相应的结果。

我们可以通过查看统计指标、绘制图表等方式对结果进行分析。

可以计算平均值、方差、置信区间等,以评估风险和收益。

三、Crystal Ball的注意事项和技巧1. 数据准确性:Crystal Ball的结果取决于输入的数据,因此需要确保数据的准确性。

Crystal Ball 模拟基础教程

Crystal  Ball   模拟基础教程

Crystal Ball 模拟基础教程利用Crystal Ball 进行计算机仿真学习目标13.2个案研究:佛莱迪报童问题(13.1节) 13.3–13.19竞标建设计划(13.2节) 13.20–13.24项目管理:信用建设公司(13.3节)13.25–13.32现金流量管理:沼泽地黄金岁月公司(13.4节) 13.33–13.37财务风险分析:久大发展公司(13.5节)13.38–13.42运输业收入管理(13.6节)13.43–13.48选择合适的分配(13.7节)13.49–13.68利用决策表做决策(13.8节) 13.69–13.84学习目标在读完本章后,你应该能够:1. 描述Crystal Ball在计算机仿真中的角色。

2. 利用Crystal Ball来解决Excel软件包所无法执行的各类基本计算机仿真。

3. 解释利用Crystal Ball于计算机仿真中的结果。

4. 在获得预期的准确度水平后,利用Crystal Ball的特色来停止计算机仿真。

5. 描述当使用Crystal Ball时可以搭配计算机仿真的机率分配之特色。

6. 利用Crystal Ball程序辨识出符合历史数据的连续分配。

7. 利用Crystal Ball的特色来产生一些帮助决策的决策表和趋势图。

报童佛莱迪佛莱迪在某大城市里主要市区经营一家报摊。

佛莱迪贩卖各类的报纸和杂志,其中最贵的报纸为财经日报。

财经日报相关的成本资料:–每份报纸的成本为1.50美元–每份报纸的售价为2.50美元–没售出的报纸,每份报纸可以获得0.50美元的偿还金财经日报的销售资料:–佛莱迪每天的销售量介于40到70份之间。

–销售数量介于40到70份之间任何数值的频率相同。

运用仿真之电子表格模式Crystal Ball的应用利用Crystal Ball来进行计算机仿真有四个步骤:–定义随机输入栏。

–定义输出栏来预测。

–设定执行偏好。

–执行模拟。

crystal ball软件介绍

crystal ball软件介绍

Crystal Ball 介绍Crystal Ball(CB)是基于PC Windows平台而开发的简单且非常实用的风险分析和评估软件。

面向各类商务、科学和技术工程领域,用户界面友好,是基于图表进行预测和风险分析。

CB 在微软Excel 应用软件上运行,使用蒙特卡罗(Monte Carlo)模拟法对某个特定状况预测所有可能的结果,运用图表对分析进行总结,并显示每一个结果的概率。

除了描述统计量、趋势图和相关变量分配,CB还进行敏感性分析,让用户决定真正导致结果的因素。

如今 CB 已是全世界商业风险分析和决策评估软件中的佼佼者。

Crystal Ball专业版是市面上以Excel为本的风险分析及预测工具中最全面的套装软件。

其功能和特点不仅早已得到广大用户的认同,并获得许多正在考虑购买相关软件产品新用户的青睐和首选。

85%<<财富>>评出的全球500强大企业中早已有400家使用 Crystal Ball 软件作为他们进行商务决策,项目投资风险分析的工具。

再者,美国前50名最佳MBA 商学院,已有40所也用Crystal Ball作为教研和商业性课题的工具。

用户之一世界著名的哈佛大学商学院把 Crystal Ball 列为可用于计划金融的软件 (Project Finance Software)。

因为财政计划,金融投资方面的风险分析是CB 软件功能的一部分。

Crystal Ball之前是美国Decisioneering公司的产品,Decisioneering在2007年被Hyperion公司收购,Hyperion 公司之后又被Oracle收购,所以Crystal Ball目前的发行商是Oracle。

Crystal Ball的用途:DFSS,过程研究,过程优化,现有过程的模拟改变,公差分析,设计分析,原料筛选,容量设计,资源分配与存货优化,约束后的项目筛选,预防性维护优化,成本预算,可靠性分析,排队过程分析,建筑项目资金预算的偶然性分析,商业过程模拟,工程设计与预测,供求预测,制造供应链问题的减少与存货控制,新产品商品化的资金模型。

crystal-ball-模拟基础教程.ppt

crystal-ball-模拟基础教程.ppt

13-11
Crys设定执行偏好
➢ 设定执行偏好就是要决定执行试验的次数,并且决定如 何执行计算机仿真的其他选项。
➢ 一开始,我们点选「Crystal Ball」标签(Excel 2007)或 是工具栏(Excel较早版本)上的「Run Preferences」 (执行偏好)按钮。
– 对于每项工作,估计其完成时间皆以用三种时间—最可能、最 乐观、以及最悲观的估计量。
问题:项目将于期限内完成的机率为何?
13-27
信用建设公司的项目网络图
13-28
每项活动时间的三角分配
13-29
运用计算机仿真之电子表格模式
13-30
三角分配的对话框
13-31
信用公司项目期间的结果
13-32
13-4
报童佛莱迪
➢ 佛莱迪在某大城市里主要市区经营一家报摊。
➢ 佛莱迪贩卖各类的报纸和杂志,其中最贵的报纸为财 经日报 。
➢ 财经日报相关的成本资料:
– 每份报纸的成本为1.50美元 – 每份报纸的售价为2.50美元 – 没售出的报纸,每份报纸可以获得0.50美元的偿还金
➢ 财经日报的销售资料:
乘其他公司飞往芝加哥的班机。而这样做的总成本为450美元(包 括:重订其他班机、机票抵用券及商誉损失等)。
问题:环球航空公司对于此航班应该接受多少的订位?
13-45
运用计算机仿真之电子表格模式
13-46
现身搭机人数之二项分配
13-47
利润之频率图
13-48
乘坐机位数之频率图
13-49
无法登机人数之频率图
➢ 最可能值落在某数值(平均值) ➢ 接近平均值的数值发生机率较高 ➢ 对称(平均值上下方图形相似) ➢ 极值可能会发生,但是非常罕见

水晶球软件初级教程

水晶球软件初级教程

水晶球软件2000专业版(CrystalBall2000ProfessionalEdition)初级教程摘要加载在微软公司(Microsoft)的电子表格软件(Excel)上的水晶球软件2000专业版(CrystalBall2000ProfessionalEdition)是一个易于使用的软件。

它可以帮助你分析与你的电子表格模型相关的风险和不确定性。

这个软件包括蒙特卡洛模拟(水晶球)、时间序列预测(水晶球预言家)、最优选择(优化查询)和用来构造定制界面和程序的开发工具箱。

由于电子表格缺乏设计和分析可选方案的能力,所以仅用电子表格来估算一个事件发生的概率是不合适的。

而加载了水晶球软件的电子表格模型就能具备这样的功能,从而帮助用户洞察模型运行和结果产生的机制。

本初级教程通过一个媒体产业的实例来演示蒙特卡洛模拟和时间序列预测工具如何用于一个电子表格模型,为商业决策的内在风险提供更深入的了解和度量。

1序言1.1电子表格模型和风险分析风险就是不确定性,是指发生损失、危害和其它不愉快事件的可能性。

大多数人偏好低风险,期待成功、收益或其它形式获利的较高概率。

举例来说,如果下个月的销售超过一定数额(一种令人愉快的事件),那么这些订单会使存货减少,从而导致商品运送的延迟(一种令人不愉快的事件)。

反过来,商品运送的延迟则会导致订单的流失。

发生这种情况的可能性就代表了一种风险。

当使用电子表格模型时,分析家习惯将那些本来不确定的变量用其平均值或其最佳估计值来输入。

这是因为电子表格软件只允许他们在一个单元格内输入一个数值或一个公式。

这些确定的模型只能产生一个结果。

而模型结果将被用作商业或技术决策的根据。

为了把握模型中本身存在的那些不确定性,分析家只能通过手工方式来改变模型变量,分析它们对关键结果的影响,来简单地实现方案分析。

这种方法提供了可能结果的一定范围,但它无法使人得知那些特定结果出现的可能性。

管理者经常需要知道那些不确定变量分别取什么值的时候,方案会达到一个最佳情况;或在什么时候,方案会达到一个最差情况;又在什么时候,方案又会达到一个最可能情况。

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

Monte-Carlo Simulation with Crystal Ball®To run a simulation using Crystal Ball®:1. Setup SpreadsheetBuild a spreadsheet that will calculate the performance measure ., profit) in terms of the inputs (random or not). For random inputs, just enter any number.2. Define Assumptions—., random variablesDefine which cells are random, and what distribution they should follow.3. Define Forecast—., output or performance measureDefine which cell(s) you are interested in forecasting (typically the performance measure, ., profit).4. Choose Number of TrialsSelect the number of trials. If you would later like to generatethe Sensitivity Analysis chart, choose “Sensitivity Analysis” under Options in Run Preferences.5. Run SimulationRun the simulation. If you would like to change parameters and re-run the simulation, you should “reset” the simulation (click on the “Reset Simulation” button on the toolbar or in the Run menu) first.6. View ResultsThe forecast window showing the results of the simulation appears automatically after (or during) the simulation. Many different results are available (frequency chart, cumulative chart, statistics, percentiles, sensitivity analysis, and trend chart). The results can be copied into the worksheet.Crystal Ball Toolbar:Define Define Run Start Reset Forecast TrendAssumptions Forecast Preferences Simulation Simulation Window ChartWalton Bookstore Simulation with Crystal Ball®Recall the Walton Bookstore example: It is August, and they must decide how many of next year’s nature calendars to order. Each calendar costs the bookstore $ and is sold for $10. After February, all unsold calendars are returned to the publisher for a refund of $ per calendar. Suppose Walton predicts demand will be somewhere between 100 and 300 (discrete uniform).Demand = d ~ Uniform[100, 300]Order Quantity = Q (decision variable)Revenue = $10 * Min(Q, d)Cost = $ * QRefund = $ * Max(Q–d, 0)Profit = Revenue – Cost + RefundStep #1 (Setup Spreadsheet)Walton Bookstore Simulation with Crystal Ball ® Step #2 (Define Assumptions —., random variables)Select the cell that contains the random variable (B17) — color code (blue):and click on the “Define Assumptions” button in toolbar (or in the Cell menu):Select type of distribution:Provide parameters of distributions:Walton Bookstore Simulation with Crystal Ball®Step #3 (Define Forecast—., output)Select the cell that contains the output variable to forecast (F17):click on the “Define Forecast” but ton in toolbar (or in the Cell menu),and fill in the Define Forecast dialogue box.Step #4 (Choose Number of Trials)Click on the “Run Preferences” button in toolbar (or in the Run menu):and select the number of trials to run.Walton Bookstore Simulation with Crystal Ball®Step #5 (Run Simulation)Click on the “Start Simulation” button in toolbar (or Run in the Run menu):Step #6 (View Results)The results of the simulation can be viewed in a variety of different ways (frequency chart, cumulative chart, statistics, and percentiles). Choose different options under the View menu in the forecast window.The results can be copied into a worksheet or Word document (choose Copy under the Edit menu in the simulation output window.Using Trend Charts to Find the Impact of Order Quantity on Potential ProfitDefine several forecast cells (G14:G18) for several possible order quantities (Q=100, 150, 200, 250, 300). Use the same random order quantity for each to compare them more equally ., one assumption cell for demand—C14—with the rest set equal to C14).After running the simulation, choose “Open Trend Chart” in the Run menu. This chart gives “certainty bands” for the forecast cells. 10% of the time, the project duration will fall within the inner band (light blue), 25% of the time within the 2nd band (red), 50% of the time within the third band (green), and 90% of the time within the outside band (dark blue).Project Management—Global OilGlobal Oil is planning to move their credit card operation to Des Moines, Iowa from their home office in Dallas. The move involves many different divisions within the company. Real estate must select one of three available office sites. Personnel has to determine which employees from Dallas will move, how many new employees to hire, and who will train them. The systems group and treasurer’s office must organize the new operating procedure and make financial arrangements. The architects will have to design the interior space, and oversee needed structural improvements. Each site is an existing building with sufficient open space, but office partitions, computer facilities, furnishings, and so on, must all be provided.A complicating factor is that there is an interdependence of activities. In other words, some parts of the project cannot be started until other parts are completed. For example, Global cannot construct the interior of an office before it has been designed. Neither can it hire new employees until it has determined its personnel requirements.The necessary activities and their necessary predecessors (due to interdependence) are listed below. Three estimates are made for the completion time of each activity—the minimum time, most likely time, and maximum time.StartEndGlobal Oil Simulation with Crystal Ball®Step #1 (Setup Spreadsheet)Step #2 (Define Assumptions—., random variables)Each of the random activity times (B, C, D, E, G, and I) is assumed to follow the triangular distribution.Global Oil Simulation with Crystal Ball®Step #3 (Define Forecast—., output)Cell J15 is the forecast cell:Step #4 (Choose Number of Trials)500 trials were run. In addition, Sensitivity Analysis was enabled in the Options of the Run Preferences dialogue box. This allows for the generation of sensitivity analysis results later.Step #5 (Run Simulation)Step #6 (View Results)Additional Results Available with Crystal Ball®Slide the triangles below the histograms to determine the probability that the output (project duration) is less than a certain value ., a deadline), greater than a certain value, or between any two values (by sliding both triangles).Alternatively, you can type in values for the lower bound or upper bound to determine the probability. You can also type in a probability (in “Certainty”), and it will determine the range that has that probability.There is a 79% chance the project will be completed within 150 days. There is a % chance that the project will take more than 160 days.Sensitivity ChartChoose “Open Sensitivity Chart” in the Run menu. Note that thischart is only available if y ou selected the “Sensitivity Analysis” option under Run Preferences. This chart gives an indication as to which random variables (activity times) have the greatest impact on the output cell (project completion time).Variability in activity E has the greatest impact on overall project duration, followed by activity D, C, I, and B. Variability in activityG has almost no impact.Fitting a DistributionCrystal Ball can be used to “fit” a distribution to data.The following data has been collected for the previous 100 phone calls to a mail-order house:(80 rows have been hidden)Fitting Data to a DistributionUsing Crystal Ball® to fit data to a distribution1. Select a spreadsheet cell.2. Choose Define Assumption.3. Click the Fit button, then select the source of the fitteddata.4. Click the Next button, then select the distributions to try tofit.5. Click OK.Interarrival TimeService Time。

相关文档
最新文档