搜档网
当前位置:搜档网 › Tutorial 2

Tutorial 2

Tutorial 2
Tutorial 2

Topic 2: Foreign Exchange Markets

In the tutorial we will work through the multiple choice questions. The extra questions at the end are extra practice for your own study.

NOTE: Extra Questions 2, 3 and 9 should be attempted before the exam. MULTIPLE CHOICE QUESTIONS:

1. The overwhelming majority of foreign exchange transactions involve

(a) multinational corporations buying and selling foreign exchange

(b) importers and exporters buying and selling foreign exchange

(c) banks buying and selling foreign exchange

(d)governments buying and selling foreign exchange

2. The primary motive of foreign exchange activities by most central banks is profit.

(a) True

(b) False

3. A forward contract to deliver British pounds for U.S. dollars could be described

either as _________________ or _______________.

(a) buying dollars forward; buying pounds forward

(b) selling pounds forward; selling dollars forward

(c) selling pounds forward; buying dollars forward

(d) selling dollars forward; buying pounds forward

4. From the viewpoint of a British investor, which of the following would be a direct

quote in the foreign exchange market?

(a) SF2.40/€

(b) $1.50/£

(c) £0.55/€

(d) $0.90/€

5. Most foreign exchange transactions are through the U.S. dollar. If the transaction

is expressed as the foreign currency per dollar this is known as _____________ whereas ___________ are expressed as dollars per foreign unit.

(a) European terms; indirect

(b) American terms; direct

(c) American terms; European terms

(d) European terms; American terms

6. The spot Singapore dollar is quoted bid S$1.7160/US$ and ask S$1.7200/US$.

What is the direct quote in the United States to the nearest 4 decimal points?

(a) US$0.5814/S$ bid, US$0.5828/S$ ask

(b) US$0.5828/S$ bid, US$0.5815/S$ ask

(c) S$1.7160/US$ bid, S$1.7200/US$ ask

(d) S$1.7200/US$ bid, S$1.7160/US$ ask

7. The U.S. dollar suddenly changes in value against the euro moving from an

exchange rate of $0.8909/€ to $0.8709/€. Thus, the dollar has ____________ by

_______.

(a) appreciated; 2.30%

(b) depreciated; 2.30%

(c) appreciated; 2.24%

(d) depreciated; 2.24%

8. Suppose that the Brazilian real devalues by 40% against the U.S. dollar. By how

much will the dollar appreciate against the real?

(a) 67%

(b) 40%

(c) 32%

(d) 28%

Use the table below for questions 9-11

Yen: Spot and Forward (¥/$) Pound: Spot and Forward ($/£)

Mid Rates Bid Ask Mid Rates Bid Ask Spot 114.25 114.20 114.30 1.7865 1.7862 1.7868 Forward Rates

1 month 114.06 -20 -18 1.7840 -26 -24 6 months 112.91 -136 -13

2 1.7708 -160 -154 Swaps

2 year 102.0

3 1232 1212 1.7631 -238 -230

3 year 99.88 1452 1422 1.7605 -265 -253

9. The one-month forward bid price for dollars as denominated in Japanese yen is?

(a) - ¥20

(b) - ¥18

(c) ¥114.12/$

(d) ¥114.00/$

10. The ask price for the two-year swap for a British pound is?

(a) $1.7631/£

(b) $1.7638/£

(c) $230

(d) $238

11. According to the information provided in the table, the 6-month yen is selling at a

forward ____________ of approximately ___________ per annum. (Use the mid rates to make your calculations.)

(a) discount; 2.37%

(b) discount; 2.31%

(c) premium; 2.37%

(d) premium; 2.31%

12. Suppose the Brazilian Real is quoted at Real 0.9455-9510/$, and the Thai baht is

quoted at Baht 25.2513-3986/$. What is the direct quote for the Real in Bangkok?

(a) 27.1267-5673

(b) 26.7801-9801

(c) 25.2597-2700

(d) 26.5524-8626

13. The following exchange rates are forecast for one-year hence. Are they in

equilibrium? Why? One-year forecasts are €0.90/$, $1.70/£ and €1.48/£.

(a) Yes, because the cross rates and forecast rates for the €/£ are equal.

(b) No, because the forecast rate of €1.48/£ requires fewer € to obtain a £ than

that forecast by the cross rates.

(c) No because the forecast rat e of €1.48/£ requires more € to obtain a £ than

that forecast by the cross rates.

(d) Not enough information to determine the correct response.

EXTRA QUESTIONS:

1.The $:DM exchange rate is DM1 = $0.35, and the DM:FF exchange rate is

1FF = DM 0.31.What is the FF:$ exchange rate?

$/FFR = ($0.35/DEM) * (DEM 0.31/FFR)

= $ 0.1085/FFR

Therefore, FFR/$ = 1/($/FFR) = 9.2166

2. A bank is quoting the following exchange rates with respect to the USD.

DEM 2.3697- 2.3725/USD and USD 1.5525-35/GBP. What DEM/GBP would the bank quote if asked?

The BID price for GBP [customer sells GBP for DEM]

= The customer sells GBP for $ at the bid price & sells $ for DEM at the bid price

= USD 1.5525/GBP * DEM 2.3697/USD = DEM 3.6789/GBP

The ASK price for GBP [customer buys GBP with DEM]

= The customer starts with DEM and converts it to USD & sells USD for GBP

= DEM 2.3725/USD *USD 1.5535/GBP = DEM 3.6857/GBP

Therefore, Bid‐Ask quote is DEM 3.6789 ‐ 3.6857/GBP

3. A bank is currently quoting spot rates of DEM

4.2446-4.2456/USD and

BEF 65.30- 65.40/USD. What rate would the bank quote for the Belgian Frank/DEM exchange rate?

The BID price for DEM (customer sells DEM for BEF)

= (BEF 65.30/USD)/(DEM 4.2456/USD)

= BEF 15.3806/DEM

The ASK price for DEM (customer buys DEM using BEF)

= (BEF 65.40/USD)/(DEM 4.2446/USD)

= BEF 15.4078/DEM

Bank’s bid‐ask price is BEF 15.3806 ‐ 15.4078/DEM

https://www.sodocs.net/doc/1114097397.html,pute the implied forward rate if a dealer was quoting the USD

against the AUD at 0.7580/90 with 30 day forward margins of 40/30 points.

To calculate the outright forward rate, the swap points are either added to or subtracted from the spot rate. A point is 0.0001.

In this case, the bid swap point > ask swap point indicating that the forward rate is at a DISCOUNT and the points must be subtracted from the spot price to get the OUTRIGHT rate

Spot 0.7580 0.7590

Swap points 0.0040 0.0030

Outright rate 0.7540 0.7560

The forward rate is trading at a discount (i.e. forward rate is < spot rate)

5.You are given the following foreign exchange quotations by a bank:

Yen = 1AUD GBP = 1 AUD USD = 1 AUD Spot 113.33/14.22 0.4876/85 0.6870/79

3 month 106.22/09.02 0.4454/89 0.6770/84

6 month 102.45/04.11 0.4211/95 0.6612/76

(a)How many Yen could 1 million GBP buy, spot?

Sell 1 million GBP for AUD and receive:

GBP 1,000,000/(GBP 0.4885/AUD) = AUD 2,047,082.9

Sell AUD for Yen to receive:

AUD 2,047,082.9 * Yen 113.33/AUD = ¥ 231,995,906.19

(b) At what rate would the customer buy Yen 3 months forward?

Buy Yen at ¥ 106.22 (the quote is ¥/AUD, the bank is buying/selling AUD. Here, the customer is buying ¥in excha nge for AUD. Since the quote is from the bank’s perspective, it will buy AUD at the bid price.)

(c) At rate would a client buy GBP for USD, 3 months forward?

Sell USD at 0.6784/AUD and

Buy GBP at 0.4454/AUD

The rate is GBP 0.6565/USD (0.4454/0.6784)

(d) At what rate would the customer buy Yen and sell pounds, spot?

Sell £ at 0.4885/AUD and

Buy ¥ at 113.33/AUD

1 £ = 113.33/0.4885 = ¥ 231.99/£

(e) How many USD could 10 million Yen buy, six months forward?

Sell ¥ 10m to receive = ¥ 10,000,000/(¥ 104.11/AUD) = A$ 96,052.25

Sell AUD for USD = A$ 96,052.25x(U$ 0.6612/$A) = U$ 63,509.75

(f) At what rate could a client buy Yen for GBP, six months forward?

Buy ¥ (6mth forward rate) at ¥ 102.45/$A

Sell £ (6mth forward rate) at £ 0.4295/$A

1 £ = ¥ 102.45/( £ 0.4295/$A) = ¥ 238.53

6. As a foreign exchange trader for Mitsubishi Bank, one of your customers

would like a spot yen quote on Australian dollars. Current market rates are:

¥101.37 – 85/USD

AUD1.2924 – 44/USD

What bid and ask rates would you quote for the ¥/AUD exchange rate? We must calculate the rate at which the bank will buy or sell $A in exchange for Yen: Yen/AUD = (Yen/USD) / (AUD/USD)

Bid Price for AUD is given by:

($A into USD into Yen)

= Yen 101.37 / $A 1.2944

$A = Yen 78.31

Ask price for AUD is given by:

(Yen into USD into $A)

= Yen 101.85 / $A 1.2924

$A = Yen 78.81

Bid – Ask Price = Yen 78.31 – 78.81/$A

7. Restate the following one-, three-, and six-month outright forward

European term bid-ask quotes in forward points.

Spot 1.3431-1.3436

One-month 1.3432-1.3442

Three-month 1.3448-1.3463

Six-month 1.3488-1.3508

Swap points are the difference between the outright forward rate and the spot

rate. Swap points are 01‐06, 17‐27 and 57‐72 for one‐, three‐ and six‐months respectively.

8. Given the following information, what are the NZD/S$ currency bid-ask

quotations?

American terms European terms

Bid Ask Bid Ask US$/NZ$ 0.4660 0.4667 NZ$/US$ 2.1427 2.1459 US$/Sing$ 0.5705 0.5710 Sing$/US$ 1.7513 1.7528 Note: American terms is direct quote from the perspective of the US$ i.e. US$/FC.

The cross-rate that we are after is the rate at which the bank will buy/sell Sing$ in exchange for NZ$. The quote is calculated using the two currencies exchange rate relative to the US$. Cross rate (NZ$/Sing$) = (US$/Sing$)/(US$/NZ$).

Bid for Sing$: Bank sells Sing$ in exchange for US$ (0.5705) and then sells US$ in exchange for NZ$ (0.4667).

Ask for Sing$: Bank uses NZ$ to buy US$ (0.4660) and then sells US$ in exchange

for Sing$ (0.5710).

NZ$/Sing$: 1.2224 – 1.2253 (rounded to 4 decimal places)

9. The Euro quote is Euro 1.0242/$ (from Dresdner Bank) and the CHF

1.5030/$ (from Credit Suisse). UBS is quoting Euro/CHF at 0.6750/CHF.

Show how you can make a triangular arbitrage by trading at these prices.

Assume that you have $5,000,000 with which to conduct the arbitrage.

What happens if you initially sell $ for CHF? What Euro/CHF price will eliminate triangular arbitrage?

The synthetic cross‐rate is 0.6814 Euro/CHF (1.0242/1.5030) while the actual cross rate is 0.6750 Euro/CHF. Therefore, fewer Euros are required to by 1 CHF than should be. So we want to be going from Euros into CHF.

1. Sell $5,000,000 for Euros @ Euro 1.0242/$ to Dresdner. This will yield Euro 5,121,000 = ($5,000,000*1.0242).

2. Sell Euros for CHF at Euro 0.6750/CHF. This action will yield CHF 7,586,667 = (5121000/0.6750).

3. Resell CHF for US$ at CHF 1.5030/$. This results in $5,047,682 = 7,586,667/1.5030. The arbitrage profit is $47,682.

The Euro/CHF cross rate should be 0.6814. At this rate triangular arbitrage opportunities will not exist. Profit is a function of the purchase of CHF at too low a rate in comparison to the equilibrium rate.

Notes :

Since the actual rate in the market is 0.675 per CHF we want to buy CHF at this "cheap" price. This is what step 2 of the answer does

2. Sell Euros for CHF at Euro 0.6750/CHF. This action will yield CHF 7,586,667 = (5121000/0.6750).

But we are told that we have $5m USD to start with. We cannot use USD we have to buy CHF, we need to change it to euro first to be able to take advantage of this cheap price. Thus we have to do step 1 first.

1. Sell $5,000,000 for Euros @ Euro 1.0242/$ to Dresdner. This will yield Euro 5,121,000 = ($5,000,000*1.0242).

In the end, we need to change back to USD to realise the profit so we have the step 3.

If you sell USD for CHF, then you will use the CHF to buy euro at the price of $0.675/CHF, if other words you will be selling CHF at this cheap price. This is the opposite of what we want. Thus you will make a loss of $47,682 instead of the profit of $47,682.

10. On February 1, the Euro is worth $0.8984. By May 1, it has moved to $0.9457. a) By how much has the Euro appreciated or depreciated against the dollar over

this 3-month period?

Since the euro is now worth more in dollar terms, it has appreciated against the dollar. The amount of euro appreciation is (0.9457 - 0.8984)/0.8984 = 5.27%.

b) By how much has the dollar appreciated or depreciated against the Euro over

this period?

The flip side of franc appreciation is dollar depreciation. The dollar has depreciated by an amount equal to:

5.00%- = 0.9457

0.9457 - 0.8984 = 0.8984

10.89841

- 0.9457

1 OR:

-5.00%= =R

= R Euro USD 10527.011111

-???

??+-???

? ?

?+

11. On Friday, September 13, 1992, the lira was worth DM 0.0013065. Over the

weekend, the lira devalued against the DM to DM 0.0012613. a) By how much has the lira devalued against the DM?

The lira devalued by (0.0012613 - 0.0013065)/0.0013065, or -3.46%.

b) By how much has the DM appreciated against the lira?

The DM appreciated against the lira by [(1/0.0012613) - (1/0.0013065)]/(1/0.0013065), or 3.58%.

ICEM中文版Tutorial_Manual

由yzmylh提供,版权所有…… Ansys icemcfd 5.1 tutorial部分内容粗略翻译及理解,水平有限,如有问题或建议请联系liqingliang@https://www.sodocs.net/doc/1114097397.html,,不胜感激。 感谢redhong等众多网友提供的资料和帮助,本人正在学习cfx,希望大家多多交流。 ANSYS ICEMCFD 5.1 使用手册 1. ANSYS ICEMCFD图形用户界面 ANSYS ICEMCFD网格编辑器的标准化图形用户界面,提供了一个完善的划分和编辑数值计算网格的环境。 另外,自从ANSYS ICEM CFD 将相应的CAD模型(同样可以生成和编辑)与网格划分链接起来以后,网格编辑器允许用户在修改CAD模型后快速再生成新的网格。对于为一个模型生成的网格可以被再次链接到一个新的CAD模型上,节约了重新划分网格的时间。 网格编辑器界面包括三个窗口: ANSYS ICEM CFD 主窗口 模型的树状目录 ANSYS ICEM CFD 信息窗口 1.1:ANSYS ICEM CFD 主窗口 除了图形显示区,在它的上部设置了一排按钮提供操作菜单,这些菜单包括:几何,网格,块,网格编辑,输出和post processing工具。 窗口的右上角有一串功能菜单,它们与以上这些菜单的选择无关。 文件:文件菜单提供许多与文件管理相关的功能,如:打开文件、保存文件、合并和输入几何模型、存档工程,这些功能方便了管理ANSYS ICEM CFD工程。 在这个菜单里有用的功能包括:新建工程、打开工程、保存工程、另存为、关闭工程、改变工作地址、几何菜单、网格属性、参数、结果、输入几何模型、输入网、输出几何模型和退出。 带有特殊标记的功能按钮包含有子菜单,可以通过点击看到。 编辑:菜单包括回退、前进、命令行、网格转换小面结构、小面结构转化为网格、结构化模型面。 视图:菜单包括合适窗口、放大、俯视、仰视、左视、右视、前视、后视、等角视、视图控制、保存视图、背景设置、镜像与复制、注释、加标记、清除标记、网格截面剖视。

GT-power中文手册(翻译中)-tutorial_3

Tutorial 3.Adding Advanced Features to the Basic Engine (给基本模型赋予更多的特征) 打开Tutorial 1中建立的tut1SIfinal.gtm,然后保存于…/tutorials/GTpower/TUT03/1-Sweep/tut3sweep.gtm 的文件。 Setting of sweeps over variables 对于模型创建期间的参数设置是非常有用的,而且扩展(sweep over)其参数的属性也同样重要。 这里,我们将扩展发动机的转速,以观察单缸发动机的力矩和能量(torque and power)曲线的形状(shape)和大小(magnitude)的变化情况。一旦发动机转速(engine speed)的参数(parameter)创建以后,如果想作进一步的设置可通过“Run/Case Setup”来完成。 操作“Run/Case Setup”,选择“Append Case”添加7次,使转速(rpm)以增量(increment)为400从4000变到1200。此操作快捷的方法是:使用方程(Equation),输入“4000”作为first case,输入“=[<1]-400”作为next case。所有利用公式(formula)修改的数据将以棕褐色背景(tan background)显示。然后,你可以通过点击“show formula/show value”来常看希望的数据形式,或者作进一步修改。(具体可以查看“GT-ISE User Manual Chapter 5,Case Setup Section”)。 当进行多个case的仿真时,“Run/Run Setup/TimeControl”非常有用。当属性设置为Old时,紧随(following)第一个case的后面的case的初始条件(initial condition)等同于前面(previous)case的结束条件(final condition)。这样的设置通常可以大大地减少多个工况仿真(multi-case)计算时间(computation time)。 Simple Transient Analysis(简单的瞬态仿真) 打开文件tut3sweepfinal.gtm,然后另存为…/tutorials/GTpower/TUT03/2-Transient/tut3trans.gtm 许多GT-POWER中的属性称为“Dependency Reference Objects”,其中经常用到的有“ProfileAngle”,“ProfileTransient”,“RLTDependence”。可以通过点击“attribute cell”然后选择“V alue Selector”来看到这些属性。 另一个改变发动机转速的方式为“ProfileTransient”。改变“EngineCrankTrain”下“Engine Speed”栏的参数[rpm]为speed。双击speed,然后在弹出的窗口中选择“ProfileTransient”,按下图所示,输入各项参数。

uppaal-tutorial

A Tutorial on Uppaal4.0 Updated November28,2006 Gerd Behrmann,Alexandre David,and Kim https://www.sodocs.net/doc/1114097397.html,rsen Department of Computer Science,Aalborg University,Denmark {behrmann,adavid,kgl}@cs.auc.dk. Abstract.This is a tutorial paper on the tool Uppaal.Its goal is to be a short introduction on the?avour of timed automata implemented in the tool,to present its interface,and to explain how to use the tool.The contribution of the paper is to provide reference examples and modelling patterns. 1Introduction Uppaal is a toolbox for veri?cation of real-time systems jointly developed by Uppsala University and Aalborg University.It has been applied successfully in case studies ranging from communication protocols to multimedia applications [35,55,24,23,34,43,54,44,30].The tool is designed to verify systems that can be modelled as networks of timed automata extended with integer variables,struc-tured data types,user de?ned functions,and channel synchronisation. The?rst version of Uppaal was released in1995[52].Since then it has been in constant development[21,5,13,10,26,27].Experiments and improvements in-clude data structures[53],partial order reduction[20],a distributed version of Uppaal[17,9],guided and minimal cost reachability[15,51,16],work on UML Statecharts[29],acceleration techniques[38],and new data structures and memory reductions[18,14].Version4.0[12]brings symmetry reduction[36], the generalised sweep-line method[49],new abstraction techniques[11],priori-ties[28],and user de?ned functions to the mainstream.Uppaal has also gen-erated related Ph.D.theses[50,57,45,56,19,25,32,8,31].It features a Java user interface and a veri?cation engine written in C++.It is freely available at https://www.sodocs.net/doc/1114097397.html,/. This tutorial covers networks of timed automata and the?avour of timed automata used in Uppaal in section2.The tool itself is described in section3, and three extensive examples are covered in sections4,5,and6.Finally,section7 introduces common modelling patterns often used with Uppaal. 2Timed Automata in Uppaal The model-checker Uppaal is based on the theory of timed automata[4](see[42] for automata theory)and its modelling language o?ers additional features such as bounded integer variables and urgency.The query language of Uppaal,used

DEM-tutorial

Modeling bubbling fluidized bed using DDPM+DEM Introduction The DEM collision model extends the DPM model in Fluent to model dense particulate flows. pneumatic conveying systems, and the flow of slurries. The DEM models is especially useful ?When dealing with a wide particle size distribution ?When dealing with relatively coarse meshes This document is a tutorial on the use of the DDPM model where collisions are modeled through DEM model. Prerequisites This tutorial will not cover the mechanics of using the Dense DPM or DEM models. It will focus on the application of these models. For more information refer the ANSYS FLUENT User's Guide and Theory Guide. This tutorial is written with the assumption that you have completed Tutorial 1 from the ANSYS FLUENT 14.0 Tutorial Guide, and that you are familiar with the ANSYS FLUENT navigation pane and menu structure. Some steps in the setup and solution procedure will not be shown explicitly. Problem Description In this tutorial we will model a bubbling fluidized bed and determine its behavior for a given superficial velocity. A rectangular bed of size 0.2m * 0.2m * 0.4m is initially charged with particles, and the superficial velocity of the gas is 0.5 m/s. The pressure drop across the bed is monitored. Schematic of the problem is shown in Figure.1. From the classic fluidization curve, if the superficial velocity of the inlet fluid is small, the bed is not fluidized and behaves like a packed bed. As the velocity of the fluid is increased, the bed begins to fluidize. One of the classical ways to understand the phenomena is the fluidization curve; here the pressure required to pump the fluid at the inlet is studied as a function of the superficial velocity. Under packed bed conditions, there is a linear increase in the pressure as the superficial velocity is increased. However, this increase begins to taper off as the condition of incipient fluidization is reached, and the pressure reaches a constant value (in a time averaged

coot-tutorial

Coot Tutorial CCP4School APS2010 May20,2010 Contents 1Mousing2 2Introductory T utorial2 2.1Get the?les (2) 2.2Start Coot (2) 2.3Display Coordinates (2) 2.4Adjust Virtual Trackball (3) 2.5Display maps (4) 2.6Zoom in and out (5) 2.7Recentre on Different Atoms (5) 2.8Change the Clipping(Slab) (7) 2.9Recontour the Map (7) 2.10Change the Map Colour (8) 2.11Select a Map (8) 3Model Building8 3.1Rotamers (8) 3.2More Real Space Re?nement (9) 4Blobology10 4.1Find Blobs (10) 4.1.1Blob3 (10) 4.1.2Blob2 (11) 4.1.3Blob1 (12) 5Extra Fun(if you have time)12 5.1Waters (12) 5.2Working with NCS (13) 5.3Add Terminal Residue (14) 5.4Display Symmetry Atoms (15) 5.5Skeletonization and Baton Building (16) 5.6Re?ne with Refmac (16) 6Use the EDS16 6.1Make a(Pretty?)Picture (17)

Tutorial实验手册

TinyOS TinyOS是一种专门为嵌入式无线传感器网络所涉及的开源操作系统,它为用户在无线传感器网络有限的资源中能够进行快速的创新和扩展提供了强大的基于组件的架构。TinyOS 的组件库包括了网络协议,发送服务、传感器驱动和数据采集工具等组件,这些组件都可以在用户的应用程序中被调用。 在这里,TinyOS并不是一个传统意义上的操作系统,它还是一个专门为嵌入式系统所设计的编程框架和用于传感器网络编程的组件库,能够使得基于TinyOS的应用程序足够的小。同时,TinyOS不支持文件系统,仅仅支持静态内存分配,扩展了一个简单的任务模型并提供了最小设备和网络的抽象。 TinyOS采用了基于组件的编程模型(nesC语言)。与其他操作系统一样,TinyOS通过层的方式对它自身的软件组件进行组织和管理,处于较低层的组件就越接近与硬件,处于较高层的组件则较接近于应用程序。一个完整的TinyOS系统应用程序就是由这些组件搭建而成,每一个组件都是一个独立的实体。在TinyOS的编程中包含了三个概念:命令、事件和任务。其中,命令和事件是组件之间交互通信的关键机制,任务则是用于传递组件外的消息。下面将分别介绍这些概念: 命令通常是向另一个组件请求服务时所发送的指令,举一个简单的例子就是要求传感器开始进行数据的采集。与之相对比的是,事件通常是一个组件在完成自身的服务后向外发送的信号。在传统的操作系统理论中,命令相当于是自上而下的调用而事件相当于回调。 TinyOS编程概览 TinyOS操作系统,组件库和所有的应用程序都使用nesC语言进行编程,nesC是一个新型基于组件的结构化编程语言,主要用于进行传感器网络的嵌入式程序开发。它采用类似于C语言的语法进行编程,因为TinyOS最初是使用汇编和C语言编写的,但是经过长期的使用,研究人员发现汇编和C语言并不能有效、方便地支持面向传感器网络的应用。因此他们对C语言进行了一定扩展,提出了支持组件化编程的nesC语言,把组件化/模块化思想和基于事件驱动的模型结合在了一起。TinyOS系统、库及应用程序都是用nesC语言写的语言写的,其目前主要用于诸如传感器网络等嵌入式系统,它具有类似于C 语言的语法,并能与其他软组件链接在一起从而形成一个鲁棒的网络嵌入式系统。nesC的主要目标是帮助应用程序设计者建立可易于组合成完整、并发式系统的组件,并能够在编译时执行广泛的检查。TinyOS定义了许多在n esC中所表达的重要概念。首先,nesC应用程序要建立在定义良好、具有双向接口的组件之上。其次,nesC定义了并发模型,该模型是基于任务及硬件事件句柄的,在编译时会进行数据争用的检测。 NesC语言在设计中的基本思想主要包括两点。 (1)程序构造机制和组合机制分离:整个程序由多个组件(component)导通(wiring)而成。组件定义了两种范围,一个是为其接口定义的范围,另一个 是为其实现定义的范围。组件可以以任务(task)形式存在,并具有内在并发 性。线程控制可以通过组件的接口(interface)传递给组件本身。这些线程可 能源于一个任务或者一个硬件中断。 (2)组件的行为规范由一组接口来定义。接口由组件提供或被使用。组件提供给用户的功能由它实现的接口体现,而被组件使用的接口则体现了来自于别的 提供了该接口的组件提供的功能。 下面将详细介绍nesC语言中的一些关键的组成部分。

Tutorial_1

1.Three managers of the Magic Potion Company are discussing a possible increase in production. Each suggests a way to make this decision: a.Harry: We should examine whether our company’s productivity – gallons of potion per worker – will rise or fall. b.Ron: We should examine whether our average cost – cost per worker – would rise or fall. c.Hermione: We should examine whether the extra revenue from selling the additional potion would be greater or smaller than the extra costs. 2.Your roommate is a better cook than you are, but you can clean more quickly than your roommate can. If your roommate did all of the cooking and you did all of the cleaning, would your chores take you more or less time than if you dividend each task evenly? Give a similar example of how specialization and trade can make two countries both better off. 3.You win $100 in a basketball pool (a lottery). You have a choice between spending the money now or putting it away for a year in a bank account that pays 5 percent interest. What is the opportunity cost of spending the $100 now? 4. A recent U.S. bill reforming the government’s antipoverty programs limited many welfare recipients to only two years of benefits. How does this change affect the incentives for working? How might this change represent a trade-off between equity and efficiency? 5.Draw a circular-flow diagram. Identify the parts of the model that correspond to the flow of goods and services and the flow of dollars for each of the following: a.Households provide firms with labour at the cost of 15$ an hour b.Firms sell households pizza at the price of 6$ each. c.Firms rent land at the cost of 500$ a month. d.Households buy earrings at the price of 15$ each. 6.Imagine a society that produces military goods and consumer goods, which will call “guns” and “butter”. a.Draw a production possibilities frontier for guns and butter. Explain why it most likely has a bowed-out shape. b.Show a point that is impossible for the economy to achieve. Show a point that is feasible but inefficient. c.Imagine that the society has two political parties, called the Hawks and the Doves. The Hawks want a strong military, and therefore they want to produce a lot of guns and not much butter. The Doves want a small military, and therefore want to produce less guns and more butter than Hawks. Show a point on your production possibilities frontier that the Hawks might choose and a point that the Doves might choose.

A tutorial on Principal Components Analysis

A tutorial on Principal Components Analysis Lindsay I Smith February26,2002

Chapter1 Introduction This tutorial is designed to give the reader an understanding of Principal Components Analysis(PCA).PCA is a useful statistical technique that has found application in ?elds such as face recognition and image compression,and is a common technique for ?nding patterns in data of high dimension. Before getting to a description of PCA,this tutorial?rst introduces mathematical concepts that will be used in PCA.It covers standard deviation,covariance,eigenvec-tors and eigenvalues.This background knowledge is meant to make the PCA section very straightforward,but can be skipped if the concepts are already familiar. There are examples all the way through this tutorial that are meant to illustrate the concepts being discussed.If further information is required,the mathematics textbook “Elementary Linear Algebra5e”by Howard Anton,Publisher John Wiley&Sons Inc, ISBN0-471-85223-6is a good source of information regarding the mathematical back-ground. 1

ANSYS Workbench Tutorial (v11)

ANSYS? Workbench? Tutorial Structural & Thermal Analysis using the ANSYS Workbench Release 11.0 Environment Kent L. Lawrence Mechanical and Aerospace Engineering University of Texas at Arlington SDC PUBLICATIONS Schroff Development Corporation https://www.sodocs.net/doc/1114097397.html, https://www.sodocs.net/doc/1114097397.html,

Solid Modeling Fundamentals 1-1 Chapter 1 Solid Modeling Fundamentals 1-1 OVERVIEW A simple L-shaped cross section is used to introduce basic solid modeling concepts with ANSYS DesignModeler. These tutorials explore solid modeling by: ?Extruding ?Revolving ?Sweeping A number of additional parametric, feature-based modeling possibilities and formulations are demonstrated in this chapter. 1-2 INTRODUCTION Solid modeling can be accomplished in a number of ways, and one favorite method involves starting with a two-dimensional shape and manipulating it to create a solid. That is the approach we will use for many of the object models created in this book. Figure 1-1 shows an L-shaped cross section that has been variously extruded, revolved, or swept along a curve to produce the solid object models shown.

python-tutorial

Python T utorial Release2.1.1 Guido van Rossum Fred L.Drake,Jr.,editor July20,2001 PythonLabs E-mail:python-docs@https://www.sodocs.net/doc/1114097397.html,

Copyright c 2001Python Software Foundation.All rights reserved. Copyright c https://www.sodocs.net/doc/1114097397.html,.All rights reserved. Copyright c 1995-2000Corporation for National Research Initiatives.All rights reserved. Copyright c 1991-1995Stichting Mathematisch Centrum.All rights reserved. See the end of this document for complete license and permissions information.

Abstract Python is an easy to learn,powerful programming language.It has ef?cient high-level data structures and a simple but effective approach to object-oriented programming.Python’s elegant syntax and dynamic typing,together with its interpreted nature,make it an ideal language for scripting and rapid application development in many areas on most platforms. The Python interpreter and the extensive standard library are freely available in source or binary form for all major platforms from the Python web site,https://www.sodocs.net/doc/1114097397.html,,and can be freely distributed.The same site also contains distributions of and pointers to many free third party Python modules,programs and tools,and additional documenta-tion. The Python interpreter is easily extended with new functions and data types implemented in C or C++(or other languages callable from C).Python is also suitable as an extension language for customizable applications. This tutorial introduces the reader informally to the basic concepts and features of the Python language and system.It helps to have a Python interpreter handy for hands-on experience,but all examples are self-contained,so the tutorial can be read off-line as well. For a description of standard objects and modules,see the Python Library Reference document.The Python Refer-ence Manual gives a more formal de?nition of the language.To write extensions in C or C++,read Extending and Embedding the Python Interpreter and Python/C API Reference.There are also several books covering Python in depth. This tutorial does not attempt to be comprehensive and cover every single feature,or even every commonly used feature.Instead,it introduces many of Python’s most noteworthy features,and will give you a good idea of the language’s?avor and style.After reading it,you will be able to read and write Python modules and programs,and you will be ready to learn more about the various Python library modules described in the Python Library Reference.

GLSL_Tutorial

GLSL Tutorial https://www.sodocs.net/doc/1114097397.html,/opengl/glsl Introduction In this tutorial shader programming using GLSL will be covered. There is an introduction to the specification, but reading the OpenGL 2.0 and GLSL official specs is always recommended if you get serious about this. It is assumed that the reader is familiar with OpenGL programming, as this is required to understand some parts of the tutorial. GLSL stands for GL Shading Language and often referred as glslang and was defined by the Architectural Review Board of OpenGL, the governing body of OpenGL. I won't go into disputes, or comparisons, with Cg, Nvidia's proposal for a shading language that is also compatible with OpenGL. The only reason I chose GLSL and not Cg for this tutorial, is GLSL closeness to OpenGL. Before writing shaders, in any language, it is a good idea to understand the basics of the graphics pipeline. This will provide a context to introduce shaders, what types of shaders are available, and what shaders are supposed to do. It will also show what shaders can't do, which is equally important. After this introduction the OpenGL setup for GLSL is discussed. The necessary steps to use a shader in an OpenGL application are discussed in some detail. Finally it is shown how an OpenGL application can feed data to a shader making it more flexible and powerful. Some basic concepts such as data types, variables, statements and function definition are then introduced. Please bear in mind that this is work in progress and therefore bugs are likely to be present in the text or demos. Let me know if you find any bug, regardless of how insignificant, so that I can clean them up. Also suggestions are more than welcome. I hope you enjoy the tutorial. Pipeline Overview The following figure is a (very) simplified diagram of the pipeline stages and the data that travels amongst them. Although extremely simplified it is enough to present some important concepts for shader programming. In this subsection the fixed functionality of the pipeline is presented. Note that this pipeline is an abstraction and does not necessarily meet any particular implementation in all its steps.

Tutorial Ch3

Tutorial 3 1.Explain what is meant by basis risk when futures contracts are used for hedging. 2.Suppose that the standard deviation of quarterly changes in the prices of a commodity is $0.65, the standard deviation of quarterly changes in a futures price on the commodity is $0.81, and the coefficient of correlation between the two changes is 0.8. What is the optimal hedge ratio for a three-month contract? What does it mean? 3. A company has a $20 million portfolio with a beta of 1.2. It would like to use futures contracts on the S&P 500 to hedge its risk. The index futures is currently standing at 1080, and each contract is for delivery of $250 times the index. What is the hedge that minimizes risk? What should the company do if it wants to reduce the beta of the portfolio to 0.6? 4.Explain why a short hedger’s position improves when the basis strengthens unexpectedly and worsens when the basis weakens unexpectedly. 5.“For an asset where futures prices are usually less than spot prices, long hedges are likely to be particularly attractive." Explain this statement. 6.The standard deviation of monthly changes in the spot price of live cattle is (in cents per pound) 1.2. The standard deviation of monthly changes in the futures price of live cattle for the closest contract is 1.4. The correlation between the futures price changes and the spot price changes is 0.7. It is now October 15. A beef producer is committed to purchasing 200,000 pounds of live cattle on November 15. The producer wants to use the December live-cattle futures contracts to hedge its risk. Each contract is for the delivery of 40,000 pounds of cattle. What strategy should the beef producer follow? 7.On July 1, an investor holds 50,000 shares of a certain stock. The market price is $30 per share. The investor is interested in hedging against movements in the market over the next month and decides to use the September Mini S&P 500 futures contract. The index is currently 1,500 and one contract is for delivery of $50 times the index. The beta of the stock is 1.3. What strategy should the investor follow? Under what circumstances will it be profitable? 8. A company wishes to hedge its exposure to a new fuel whose price changes have a 0.6 correlation with gasoline futures price changes. The company will lose $1 million for each 1 cent increase in the price per gallon of the new fuel over the next three months. The new fuel's price change has a standard deviation that is 50% greater than price changes in gasoline futures prices. If gasoline futures are used to hedge the exposure what should the hedge ratio be? What is the company's exposure measured in gallons of the new fuel? What position measured in gallons should the company take in gasoline futures? How many gasoline futures contracts should be traded? Each contract is on 42,000 gallons. 9.It is July 16. A company has a portfolio of stocks worth $100 million. The beta of the portfolio is 1.2. The company would like to use the CME December futures contract on

相关主题