<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Techiella's blog</title>
	<atom:link href="http://techiella.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://techiella.wordpress.com</link>
	<description>The godzilla of technology, in other words... scary stuff</description>
	<lastBuildDate>Thu, 05 Jan 2012 09:03:52 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='techiella.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Techiella's blog</title>
		<link>http://techiella.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://techiella.wordpress.com/osd.xml" title="Techiella&#039;s blog" />
	<atom:link rel='hub' href='http://techiella.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Outlook custom actions</title>
		<link>http://techiella.wordpress.com/2011/02/09/outlook-custom-actions/</link>
		<comments>http://techiella.wordpress.com/2011/02/09/outlook-custom-actions/#comments</comments>
		<pubDate>Wed, 09 Feb 2011 20:04:52 +0000</pubDate>
		<dc:creator>anonymous</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://techiella.wordpress.com/?p=109</guid>
		<description><![CDATA[Recently I wanted to write a small Outlook plugin to solve a problem I was having (mainly dealing with support). I looked at the various options of writing code that interacts with Outlook. And here&#8217;s a quick, non comprehensive list: 1. VBA &#8211; not too bad, but unfortunately not portable &#8211; it&#8217;s not possible to [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=techiella.wordpress.com&amp;blog=4061067&amp;post=109&amp;subd=techiella&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Recently I wanted to write a small Outlook plugin to solve a problem I was having (mainly dealing with support). I looked at the various options of writing code that interacts with Outlook. And here&#8217;s a quick, non comprehensive list:<br />
1. VBA &#8211; not too bad, but unfortunately not portable &#8211; it&#8217;s not possible to easily export, import, install, distribute this code (Outlook is not advanced as Excel). So with VBA you can write your own macros or import .bas modules or VBA code manually<br />
2. Outlook plugins &#8211; this uses the Office Extensibility interface &#8211; which all the Office plugins share. This is pretty good, as it gives you access to the full object model<br />
3. Custom actions &#8211; this uses the rules wizard (in the actions screen, you can select to perform a custom action). I was puzzled by this, and even more intrigued when I couldn&#8217;t find any documentation on this. It seems Microsoft have deprecated the custom actions. They still support them, but they have removed both the documentation and the header files.<br />
They want to encourage developers to write Outlook plugins instead.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/techiella.wordpress.com/109/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/techiella.wordpress.com/109/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/techiella.wordpress.com/109/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/techiella.wordpress.com/109/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/techiella.wordpress.com/109/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/techiella.wordpress.com/109/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/techiella.wordpress.com/109/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/techiella.wordpress.com/109/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/techiella.wordpress.com/109/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/techiella.wordpress.com/109/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/techiella.wordpress.com/109/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/techiella.wordpress.com/109/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/techiella.wordpress.com/109/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/techiella.wordpress.com/109/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=techiella.wordpress.com&amp;blog=4061067&amp;post=109&amp;subd=techiella&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://techiella.wordpress.com/2011/02/09/outlook-custom-actions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d28b68287e6d139d41b12b760b7a32fe?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">techiella</media:title>
		</media:content>
	</item>
		<item>
		<title>C# Excel plugin getting disabled</title>
		<link>http://techiella.wordpress.com/2010/11/15/c-excel-plugin-getting-disabled/</link>
		<comments>http://techiella.wordpress.com/2010/11/15/c-excel-plugin-getting-disabled/#comments</comments>
		<pubDate>Mon, 15 Nov 2010 16:07:08 +0000</pubDate>
		<dc:creator>anonymous</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Excel]]></category>

		<guid isPermaLink="false">http://techiella.wordpress.com/?p=104</guid>
		<description><![CDATA[Excel disables a plugin (I&#8217;m referring to COM and Automation addins here) in two ways: 1. Hard disable &#8211; when the plugin causes the host (Excel) to crash In this case, the COM addin will be in the disabled list and the user will get a message next time it starts Excel asking whether the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=techiella.wordpress.com&amp;blog=4061067&amp;post=104&amp;subd=techiella&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Excel disables a plugin (I&#8217;m referring to COM and Automation addins here) in two ways:</p>
<p>1. Hard disable &#8211; when the plugin causes the host (Excel) to crash</p>
<p>In this case, the COM addin will be in the disabled list and the user will get a message next time it starts Excel asking whether the user still wants that addin or not.<br />
The way Excel does this is by putting the plugin on a black list before calling the OnConnection method (IDTExtensibility2). If the method crashes the host, next time Excel starts up, it finds the offending plugin in the black list.<br />
If the method returns fine, Excel removes it from the black list.<br />
It&#8217;s difficult to crash the host from .net, but not impossible. Most of the disables in .net are however&#8230;</p>
<p>2. Soft disable &#8211; when the plugin returns a failure HRESULT from OnConnection</p>
<p>In .net that means that an exception escapes from OnConnection. The .net framework converts this into an HRESULT when the method returns.<br />
In order to fix that, you need to look into the following areas:<br />
- catch every exception in OnConnection (duh!)<br />
- look at any members part of your class implementing IDTExtensibility2 (any constructor there which throws will generate this condition)<br />
- also look at any static members that can potentially throw<br />
- look at any problems loading dependent assemblies needed by your assembly (this can also cause this)<br />
- if you haven&#8217;t written a wrapper for your plugin, and your plugin runs as the mscoree.dll plugin, then check if other similar plugin haven&#8217;t been disabled (Excel disables mscoree which disables all plugins running under that &#8211; check the MS website on how to write a wrapper and avoid this problem)</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/techiella.wordpress.com/104/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/techiella.wordpress.com/104/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/techiella.wordpress.com/104/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/techiella.wordpress.com/104/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/techiella.wordpress.com/104/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/techiella.wordpress.com/104/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/techiella.wordpress.com/104/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/techiella.wordpress.com/104/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/techiella.wordpress.com/104/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/techiella.wordpress.com/104/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/techiella.wordpress.com/104/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/techiella.wordpress.com/104/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/techiella.wordpress.com/104/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/techiella.wordpress.com/104/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=techiella.wordpress.com&amp;blog=4061067&amp;post=104&amp;subd=techiella&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://techiella.wordpress.com/2010/11/15/c-excel-plugin-getting-disabled/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d28b68287e6d139d41b12b760b7a32fe?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">techiella</media:title>
		</media:content>
	</item>
		<item>
		<title>System.Threading.SynchronizationLockException</title>
		<link>http://techiella.wordpress.com/2010/10/20/system-threading-synchronizationlockexception/</link>
		<comments>http://techiella.wordpress.com/2010/10/20/system-threading-synchronizationlockexception/#comments</comments>
		<pubDate>Wed, 20 Oct 2010 13:20:44 +0000</pubDate>
		<dc:creator>anonymous</dc:creator>
				<category><![CDATA[C#]]></category>

		<guid isPermaLink="false">http://techiella.wordpress.com/?p=98</guid>
		<description><![CDATA[I got this exception a while ago when implementing a simple publisher/consumer scheme with 2 threads in C#. What this exception says is that you&#8217;re trying to use some operations without a lock held. In my case it was Monitor.Pulse(object). These sort of operations conceptually need to be done with the lock on object held, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=techiella.wordpress.com&amp;blog=4061067&amp;post=98&amp;subd=techiella&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I got this exception a while ago when implementing a simple publisher/consumer scheme with 2 threads in C#. What this exception says is that you&#8217;re trying to use some operations without a lock held. In my case it was Monitor.Pulse(object).<br />
These sort of operations conceptually need to be done with the lock on object held, for the same reason old Unix condition variable had to do certain operations with the lock held: to avoid race conditions where one thread can miss the signal and get blocked forever on a synchronization primitive.</p>
<p>So the first really easy way to catch this is check if you hold the lock, if not, easy, just add it.</p>
<p>The other situation is to lock one object and operate on another:</p>
<pre>lock(Object1)
{
    if(condition)
    {
        Monitor.Wait(Object2)
    }
}</pre>
<p>These scenarios are easy to catch and fix because they throw all the time. But this exception can occur in race conditions where it&#8217;s more difficult to catch. Let&#8217;s look at the following code:</p>
<p>Thread 1 (publisher):</p>
<pre>lock(_queue)
{
     _queue.Add(new_element);
     Monitor.Pulse(_queue);
}</pre>
<p>Thread 2 (consumer):</p>
<pre>
List queue;
lock(_queue)
{
     queue = _queue;
     _queue = new List();
}
ProcessQueue(queue);
</pre>
<p>The idea here is to try to optimize the way the list of type T is emptied and then processed. In particular, the optimization is that it doesn&#8217;t create a copy. The copy can be re-written, without this optimization as:</p>
<pre>
     queue = new List(_queue);
     _queue.Clear();
</pre>
<p>This has the problem that it allocates memory and copies data, all with the lock held.</p>
<p>But unfortunately, while the optimization works, it&#8217;s not entirely correct, as it created a hidden race condition. To illustrate the race condition, I&#8217;ll present it here, step by step, with the code running on both threads interlaced below:</p>
<pre>
1: Thread2:  lock(_queue) &lt;- acquires lock on _queue
2: Thread1:  lock(_queue) &lt;- lock is held by thread2, so thread1 gets blocked here
3: Thread2:  queue = _queue;
4: Thread2:  _queue = new List();
5: Thread2:  release lock on _queue
6: Thread1:  _queue.Add(new_element);
7: Thread1:  Monitor.Pulse(_queue);
</pre>
<p>At this step 7, Monitor.Pulse throws a System.Threading.SynchronizationLockException.<br />
The reason is that thread1 acquired a lock on _queue but then thread2 changed the &#8220;meaning&#8221; of the reference _queue, so when thread1 pulses the _queue, it pulses a different object than the one it acquired the lock on. Thus the exception.</p>
<p>Once the problem is understood, the solution is simple: synchronize on an immutable object. You can create a dummy object and sync on that, rather than the mutable _queue.<br />
Or you can implement the more inefficient version, which doesn&#8217;t actually change the object _queue refers to.</p>
<p>PS: To reproduce this relatively consistently, insert a Thread.Sleep(5000) in thread2, right after it acquired the lock.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/techiella.wordpress.com/98/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/techiella.wordpress.com/98/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/techiella.wordpress.com/98/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/techiella.wordpress.com/98/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/techiella.wordpress.com/98/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/techiella.wordpress.com/98/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/techiella.wordpress.com/98/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/techiella.wordpress.com/98/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/techiella.wordpress.com/98/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/techiella.wordpress.com/98/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/techiella.wordpress.com/98/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/techiella.wordpress.com/98/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/techiella.wordpress.com/98/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/techiella.wordpress.com/98/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=techiella.wordpress.com&amp;blog=4061067&amp;post=98&amp;subd=techiella&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://techiella.wordpress.com/2010/10/20/system-threading-synchronizationlockexception/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d28b68287e6d139d41b12b760b7a32fe?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">techiella</media:title>
		</media:content>
	</item>
		<item>
		<title>Excel: UDF not available in automation mode</title>
		<link>http://techiella.wordpress.com/2010/10/19/excel-udf-not-available-in-automation-mode/</link>
		<comments>http://techiella.wordpress.com/2010/10/19/excel-udf-not-available-in-automation-mode/#comments</comments>
		<pubDate>Tue, 19 Oct 2010 12:49:24 +0000</pubDate>
		<dc:creator>anonymous</dc:creator>
				<category><![CDATA[Excel]]></category>

		<guid isPermaLink="false">http://techiella.wordpress.com/?p=96</guid>
		<description><![CDATA[One problem I was having lately is that some UDF in an Automation addin was not available when Excel was started in automation mode, via a C# application. Checking the Automation addin in Tools/Addins showed it was enabled, ticked and should have been working. But when trying to call the UDF, I was getting #NAME? [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=techiella.wordpress.com&amp;blog=4061067&amp;post=96&amp;subd=techiella&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>One problem I was having lately is that some UDF in an Automation addin was not available when Excel was started in automation mode, via a C# application. Checking the Automation addin in Tools/Addins showed it was enabled, ticked and should have been working.<br />
But when trying to call the UDF, I was getting #NAME?</p>
<p>This can be easily replicated by starting Excel in automation mode:</p>
<p>Excel /automation spreadsheet_name.xls</p>
<p>Using the UDF in the automation addin has the same problem, it shows #NAME?</p>
<p>After a bit of googling, it turns out that in automation mode, you have to re-enable the plugin as it&#8217;s not loaded by default. So the solution is to un-tick the addin in the Tools/Addins dialog and tick it back on.</p>
<p>Or programatically you need to do this:</p>
<p>set oAddin = Application.Addins(&#8220;YourAddin.ProgId&#8221;)<br />
oAddin.Installed = False<br />
oAddin.Installed = True</p>
<p>If it&#8217;s not in the list, you will have to add it first with:</p>
<p>Application.Addins.Add(&#8220;YourAddin.ProgId&#8221;)</p>
<p>Once you do that, the UDF starts working fine.</p>
<p>If your UDF is in an XLL rather than an Automation Addin, then you can also use the RegisterXLL API.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/techiella.wordpress.com/96/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/techiella.wordpress.com/96/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/techiella.wordpress.com/96/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/techiella.wordpress.com/96/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/techiella.wordpress.com/96/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/techiella.wordpress.com/96/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/techiella.wordpress.com/96/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/techiella.wordpress.com/96/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/techiella.wordpress.com/96/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/techiella.wordpress.com/96/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/techiella.wordpress.com/96/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/techiella.wordpress.com/96/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/techiella.wordpress.com/96/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/techiella.wordpress.com/96/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=techiella.wordpress.com&amp;blog=4061067&amp;post=96&amp;subd=techiella&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://techiella.wordpress.com/2010/10/19/excel-udf-not-available-in-automation-mode/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d28b68287e6d139d41b12b760b7a32fe?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">techiella</media:title>
		</media:content>
	</item>
		<item>
		<title>Excel</title>
		<link>http://techiella.wordpress.com/2010/10/09/exce/</link>
		<comments>http://techiella.wordpress.com/2010/10/09/exce/#comments</comments>
		<pubDate>Sat, 09 Oct 2010 11:19:11 +0000</pubDate>
		<dc:creator>anonymous</dc:creator>
				<category><![CDATA[Excel]]></category>

		<guid isPermaLink="false">http://techiella.wordpress.com/?p=93</guid>
		<description><![CDATA[I know it&#8217;s been a long time since my last post and I apologize. In the mean time, I was doing quite a bit of Excel programming and that&#8217;s the experience I want to talk about. I didn&#8217;t know much about Excel before starting. I have done VB, VBScript before so that came as no [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=techiella.wordpress.com&amp;blog=4061067&amp;post=93&amp;subd=techiella&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I know it&#8217;s been a long time since my last post and I apologize.</p>
<p>In the mean time, I was doing quite a bit of Excel programming and that&#8217;s the experience I want to talk about. I didn&#8217;t know much about Excel before starting. I have done VB, VBScript before so that came as no surprise. I also knew Excel is used quite a lot in the financial community, so I was keen to get some exposure to it.<br />
After almost a year of development, ranging from VBA, plugin development (COM addin + Automation addin &#8211; DDE) and RTD, I can say, I have mixed feelings.</p>
<p>The overall experience I&#8217;m taking from this is that Excel is not a mature environment for development and the experience can be quite frustrating. It is almost decent at VBA, but when you start with addins, RTD, it all leaves a slightly bitter taste in your mouth. And here&#8217;s why, all the reasons listed one after the other:</p>
<p>1. Excel is single threaded. This has several implications:<br />
a. You cannot call into Excel when it&#8217;s busy, RPC calls fail, for this you have to retry, or sometimes you get the dreaded dialog telling you that the STA is busy<br />
b. It&#8217;s slower than it should be. Cannot take advantage of multi-processors<br />
c. Can get easily into a &#8220;frozen&#8221; state, when long operations have to be done on the UI thread<br />
d. Operations need to be marshalled into the STA, which is extremely slow and I do mean extremely</p>
<p>In Excel 2007 they have introduced multi-threading. However, they have also changed the interface, introducing the ribbon interface and alienating the entire financial community. No one is moving to Excel 2007 for that reason.</p>
<p>2. Error handling is extremely poor</p>
<p>When something happens, you don&#8217;t get a clear error, but instead a general error of what happens. Many APIs return the same errors and the errors are not documented.<br />
This is truly a killer, and it&#8217;s true with the whole Excel object model. A very very big issue.</p>
<p>3. The addin frameworks are all a bit of mess</p>
<p>There are 3 main types of addins:<br />
a. COM addin, you can implement UI elements, but no UDFs<br />
b. Automation addins, you can implement UDFs, but no UI elements<br />
c. RTD servers, you can implement a very limited interface to update data, a pull-push hybrid, but no access to the Excel object model at all</p>
<p>So, let&#8217;s say you want to implement an addin which has a UI menu with some functionality, provides a UDF, which operates asynchronously. Then you need a combination of potentially all three addins in one, maybe add VBA xla on top of that.</p>
<p>4. Some operations don&#8217;t work from addins, only from VBA, or only from some context, or only if the VBA_E_IGNORE is not set, or if other black box conditions are set</p>
<p>Again, lack of documentation makes it really difficult to develop. It&#8217;s a trial &amp; error approach which works most of the time.<br />
You always face the problem where your addin works most of the time, unless the user does something which you didn&#8217;t expect and tested.</p>
<p>5. Pushing data into Excel is very difficult</p>
<p>Either Excel is busy, or sets itself into VBA_E_IGNORE when a dialog is present, or operations fail because you&#8217;re in edit mode.<br />
This problem was addressed by the introduction of the RTD framework</p>
<p>6. Excel is still buggy and it can crash</p>
<p>If you do certain operations, you might hit a bug in Excel and crash it. It crashes because bugs in Excel, but your addin/VBA are triggering, so you look like a culprit.</p>
<p>7. Excel doesn&#8217;t perform very well when you have big workbooks with a lot of data</p>
<p>8. Very difficult to debug problems in Excel, or weirdness like above, because Excel is a black box</p>
<p>Still, Excel is loved in the financial community, because it makes non-programmers more productive by its operations. It&#8217;s an easy way to present, format data which can be refreshed and kept up to date.<br />
Yet, for developers, it can be a nightmare.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/techiella.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/techiella.wordpress.com/93/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/techiella.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/techiella.wordpress.com/93/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/techiella.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/techiella.wordpress.com/93/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/techiella.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/techiella.wordpress.com/93/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/techiella.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/techiella.wordpress.com/93/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/techiella.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/techiella.wordpress.com/93/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/techiella.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/techiella.wordpress.com/93/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=techiella.wordpress.com&amp;blog=4061067&amp;post=93&amp;subd=techiella&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://techiella.wordpress.com/2010/10/09/exce/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d28b68287e6d139d41b12b760b7a32fe?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">techiella</media:title>
		</media:content>
	</item>
		<item>
		<title>Photographing the Earth from above</title>
		<link>http://techiella.wordpress.com/2009/09/25/photographing-the-earth-from-above/</link>
		<comments>http://techiella.wordpress.com/2009/09/25/photographing-the-earth-from-above/#comments</comments>
		<pubDate>Fri, 25 Sep 2009 20:57:41 +0000</pubDate>
		<dc:creator>anonymous</dc:creator>
				<category><![CDATA[Science]]></category>

		<guid isPermaLink="false">http://techiella.wordpress.com/?p=91</guid>
		<description><![CDATA[I was impressed by this: http://www.wired.com/gadgetlab/2009/09/the-150-space-camera-mit-students-beat-nasa-on-beer-money-budget/ Two MIT students have managed to take pictures or the Earth curvature by launching a photo camera + mobile phone attached to a balloon. I was really impressed. If I was a kid, this would be very motivating stuff to get me into science. I would probably try to [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=techiella.wordpress.com&amp;blog=4061067&amp;post=91&amp;subd=techiella&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I was impressed by this: <a href="http://www.wired.com/gadgetlab/2009/09/the-150-space-camera-mit-students-beat-nasa-on-beer-money-budget/">http://www.wired.com/gadgetlab/2009/09/the-150-space-camera-mit-students-beat-nasa-on-beer-money-budget/</a></p>
<p>Two MIT students have managed to take pictures or the Earth curvature by launching a photo camera + mobile phone attached to a balloon. I was really impressed. If I was a kid, this would be very motivating stuff to get me into science. I would probably try to replicate it too&#8230;</p>
<p>Being a software engineer, I&#8217;m thinking &#8230; what if you get a &#8220;smartphone&#8221; and you write some software for it &#8230; what software would you write? Well, let&#8217;s see:</p>
<p>1. Software to control the camera integrated in the smartphone, so you don&#8217;t need a camera and a phone<br />
2. Software to connect via gprs and submit live images (or hey, a live streaming) &#8230; question is, would you have any signal at 28km above the earth?<br />
3. Software to monitor the GPS trajectory and altitude, so that you can plot it on a map and you can draw all sorts of graphs<br />
4.  A IM chat client to tell your friends you&#8217;ve done it <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/techiella.wordpress.com/91/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/techiella.wordpress.com/91/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/techiella.wordpress.com/91/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/techiella.wordpress.com/91/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/techiella.wordpress.com/91/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/techiella.wordpress.com/91/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/techiella.wordpress.com/91/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/techiella.wordpress.com/91/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/techiella.wordpress.com/91/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/techiella.wordpress.com/91/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/techiella.wordpress.com/91/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/techiella.wordpress.com/91/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/techiella.wordpress.com/91/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/techiella.wordpress.com/91/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=techiella.wordpress.com&amp;blog=4061067&amp;post=91&amp;subd=techiella&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://techiella.wordpress.com/2009/09/25/photographing-the-earth-from-above/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d28b68287e6d139d41b12b760b7a32fe?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">techiella</media:title>
		</media:content>
	</item>
		<item>
		<title>MQL</title>
		<link>http://techiella.wordpress.com/2009/09/22/mql/</link>
		<comments>http://techiella.wordpress.com/2009/09/22/mql/#comments</comments>
		<pubDate>Tue, 22 Sep 2009 20:14:28 +0000</pubDate>
		<dc:creator>anonymous</dc:creator>
				<category><![CDATA[FX algo trading]]></category>

		<guid isPermaLink="false">http://techiella.wordpress.com/?p=89</guid>
		<description><![CDATA[I&#8217;ve added recently another language to my repertoire: MQL. It&#8217;s the native language in the MetaTrader, which is a FX trading application. I&#8217;ve started FX trading only recently but I&#8217;m really attracted by the algo trading and trading in general. MQL is quite basic, it doesn&#8217;t support complex data types, I could really use with [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=techiella.wordpress.com&amp;blog=4061067&amp;post=89&amp;subd=techiella&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve added recently another language to my repertoire: MQL. It&#8217;s the native language in the MetaTrader, which is a FX trading application. I&#8217;ve started FX trading only recently but I&#8217;m really attracted by the algo trading and trading in general.<br />
MQL is quite basic, it doesn&#8217;t support complex data types, I could really use with a dictionary or an object of some sort.</p>
<p>What can you do with it? You can write an Expert Advisor, this is a algo trading application.<br />
It has a 3 methods: init, deinit and start. The first 2 act as constructor/destructor, whereas the second is called on every tick, which you can process and then decide whether to open a trade, close a trade or do nothing.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/techiella.wordpress.com/89/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/techiella.wordpress.com/89/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/techiella.wordpress.com/89/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/techiella.wordpress.com/89/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/techiella.wordpress.com/89/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/techiella.wordpress.com/89/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/techiella.wordpress.com/89/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/techiella.wordpress.com/89/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/techiella.wordpress.com/89/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/techiella.wordpress.com/89/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/techiella.wordpress.com/89/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/techiella.wordpress.com/89/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/techiella.wordpress.com/89/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/techiella.wordpress.com/89/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=techiella.wordpress.com&amp;blog=4061067&amp;post=89&amp;subd=techiella&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://techiella.wordpress.com/2009/09/22/mql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d28b68287e6d139d41b12b760b7a32fe?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">techiella</media:title>
		</media:content>
	</item>
		<item>
		<title>Outsourcing</title>
		<link>http://techiella.wordpress.com/2009/09/07/outsourcing/</link>
		<comments>http://techiella.wordpress.com/2009/09/07/outsourcing/#comments</comments>
		<pubDate>Mon, 07 Sep 2009 19:39:31 +0000</pubDate>
		<dc:creator>anonymous</dc:creator>
				<category><![CDATA[IT Management]]></category>

		<guid isPermaLink="false">http://techiella.wordpress.com/?p=87</guid>
		<description><![CDATA[Does outsourcing works? It&#8217;s a question I had to revisit recently because my company is thinking about outsourcing. The main reason is cost and I think that&#8217;s the wrong reason to outsource for. And because you start outsourcing for the wrong reasons, it ultimately ends up in a failure. Most companies look at it as [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=techiella.wordpress.com&amp;blog=4061067&amp;post=87&amp;subd=techiella&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Does outsourcing works? It&#8217;s a question I had to revisit recently because my company is thinking about outsourcing. The main reason is cost and I think that&#8217;s the wrong reason to outsource for. And because you start outsourcing for the wrong reasons, it ultimately ends up in a failure.</p>
<p>Most companies look at it as a purely tactical move, although they call it strategic. The attraction is cost. However, because the move is tactical, the integration is also at a very tactical level. Usually the team assigns unattractive tasks like defect fixing or other uninteresting work to the offshore teams. Which ultimately leads to other problems like lack of knowledge, specialization and ultimately productivity (which is labelled as failure, and rightly so). Also, because the work is so un-attractive, it only appeals to mediocre employees, the best ones leave for greener pastures. In the end, it becomes a problem of loyalty.</p>
<p>An important problem is communication and the fact that there&#8217;s a bigger disconnect betwen the onshore and offshore (or nearshore) teams. Specs have to be more detailed and knowledge needs to be transferred more formally (which in IT doesn&#8217;t work that well &#8211; a lot of knowledge is tacit and not necessarily easy to capture in documents and diagrams).<br />
This in the end results in more tech lead and PM time, which is quite expensive. Tech leadership and PM become full time jobs dedicated to the offshore team. If you add the cost of lower productivity to do with poorer communication and disconnection from the business/front office and you add also the travel costs, I&#8217;m not sure it&#8217;s such a good deal anymore.</p>
<p>Nevertheless, waves and waves of management professionals and consultants will fall for it, because on paper it represents such a good deal. You can boast about cutting cost which is music to the ear for the upper management, especially in recessions. And then they can cash in their bonuses and claim success in the short term, whereas the company (and shareholders ultimately) are left to pick up the pieces.</p>
<p>I&#8217;m not against outsourcing though, I&#8217;m just against it when it&#8217;s done for the wrong reasons. I also think that doing it for the right reasons would also mean doing less of it overall. Just because it&#8217;s not a universal panacea.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/techiella.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/techiella.wordpress.com/87/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/techiella.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/techiella.wordpress.com/87/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/techiella.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/techiella.wordpress.com/87/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/techiella.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/techiella.wordpress.com/87/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/techiella.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/techiella.wordpress.com/87/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/techiella.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/techiella.wordpress.com/87/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/techiella.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/techiella.wordpress.com/87/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=techiella.wordpress.com&amp;blog=4061067&amp;post=87&amp;subd=techiella&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://techiella.wordpress.com/2009/09/07/outsourcing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d28b68287e6d139d41b12b760b7a32fe?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">techiella</media:title>
		</media:content>
	</item>
		<item>
		<title>After a long time&#8230;</title>
		<link>http://techiella.wordpress.com/2009/08/31/after-a-long-time/</link>
		<comments>http://techiella.wordpress.com/2009/08/31/after-a-long-time/#comments</comments>
		<pubDate>Mon, 31 Aug 2009 17:08:44 +0000</pubDate>
		<dc:creator>anonymous</dc:creator>
				<category><![CDATA[Misc]]></category>

		<guid isPermaLink="false">http://techiella.wordpress.com/?p=85</guid>
		<description><![CDATA[It&#8217;s been a long time since I&#8217;ve posted here and it&#8217;s all my fault. A lot happened but the markets now are stabilizing, jobs are safer and we can go back to writing blogs and sipping coffee &#8230; I suppose. I saw recently one comment to a previous problem I posted here and I&#8217;m trying [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=techiella.wordpress.com&amp;blog=4061067&amp;post=85&amp;subd=techiella&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s been a long time since I&#8217;ve posted here and it&#8217;s all my fault. A lot happened but the markets now are stabilizing, jobs are safer and we can go back to writing blogs and sipping coffee &#8230; I suppose.<br />
I saw recently one comment to a previous problem I posted here and I&#8217;m trying to contact the poster to provide more explanation, as I&#8217;m intrigued. I didn&#8217;t have to think more about the problem and solutions, but if he comes back to me with a detailed answer, I will try to digest it and publish it.<br />
I will also try to write more here and resurrect this blog&#8230;</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/techiella.wordpress.com/85/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/techiella.wordpress.com/85/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/techiella.wordpress.com/85/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/techiella.wordpress.com/85/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/techiella.wordpress.com/85/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/techiella.wordpress.com/85/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/techiella.wordpress.com/85/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/techiella.wordpress.com/85/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/techiella.wordpress.com/85/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/techiella.wordpress.com/85/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/techiella.wordpress.com/85/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/techiella.wordpress.com/85/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/techiella.wordpress.com/85/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/techiella.wordpress.com/85/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=techiella.wordpress.com&amp;blog=4061067&amp;post=85&amp;subd=techiella&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://techiella.wordpress.com/2009/08/31/after-a-long-time/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d28b68287e6d139d41b12b760b7a32fe?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">techiella</media:title>
		</media:content>
	</item>
		<item>
		<title>Discount yield to money market yield conversion</title>
		<link>http://techiella.wordpress.com/2009/01/26/discount-yield-to-money-market-yield-conversion/</link>
		<comments>http://techiella.wordpress.com/2009/01/26/discount-yield-to-money-market-yield-conversion/#comments</comments>
		<pubDate>Mon, 26 Jan 2009 01:53:16 +0000</pubDate>
		<dc:creator>anonymous</dc:creator>
				<category><![CDATA[Fixed income]]></category>
		<category><![CDATA[Fabozzi]]></category>
		<category><![CDATA[money market]]></category>
		<category><![CDATA[t-bill]]></category>
		<category><![CDATA[treasury bill]]></category>
		<category><![CDATA[yield]]></category>

		<guid isPermaLink="false">http://techiella.wordpress.com/?p=81</guid>
		<description><![CDATA[I haven&#8217;t written in a long time. On top of that my next entry is technical. It&#8217;s about the conversion between discount yield to money market yield. Reading one of Fabozzi&#8217;s book, I was puzzled about the equation. It was presented without the proper deduction or explanation. The equation is: m = (360 * Yd) [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=techiella.wordpress.com&amp;blog=4061067&amp;post=81&amp;subd=techiella&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I haven&#8217;t written in a long time. On top of that my next entry is technical. It&#8217;s about the conversion between discount yield to money market yield. Reading one of Fabozzi&#8217;s book, I was puzzled about the equation. It was presented without the proper deduction or explanation.</p>
<p>The equation is:</p>
<p>m = (360 * Yd) / (360 &#8211; t * Yd)</p>
<p>where m is the Money Market equivalent yield, Yd is the discount yield, t is the number of days between the settlement and maturity.</p>
<p>This equation is required when you want to compare the return of a tresury bill (quoted in discount yield) and an equivalent CD (certificate of deposit). The day count convension for both is Act/360.</p>
<p>The discount yield for a t-bill is calculated with the following:</p>
<p>Yd = D * 360 / (t * F)</p>
<p>where D is the cash discount (actual amount of money that you get after t days per face value unit) and F is the face value.</p>
<p>The price of the t-bill is then P = F &#8211; D, assuming usually a face value of 100$.</p>
<p>The T-bill cash flow after t days is D (the discount). For a CD, the cash flow after t days is m * P * t / 360 where m is the money market yield and P is the price (or money invested).</p>
<p>To calculate equivalent yields, the cashflows must match. So, we have:</p>
<p>D = m * P * t / 360</p>
<p>Resolving for m, results into:</p>
<p>m = D * 360 / (t*P)</p>
<p>We extract D from the definition of the discount yield:</p>
<p>D = Yd * F * t / 360 </p>
<p>which gives:</p>
<p>m = Yd * F / P</p>
<p>P = F &#8211; D = F &#8211; Yd * F * t / 360 = F ( 1 &#8211; Yd * t / 360) = F * ( 360 &#8211; Yd * t) / 360</p>
<p>We replace the price in the equation for m:</p>
<p>m = Yd * 360 / (360 &#8211; Yd * t)</p>
<p>which is the equation in Fabozzi.</p>
<p>This conversion is used to compare T-bill investments with money market investments because the discount yield cannot be directly compared with the money market yield.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/techiella.wordpress.com/81/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/techiella.wordpress.com/81/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/techiella.wordpress.com/81/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/techiella.wordpress.com/81/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/techiella.wordpress.com/81/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/techiella.wordpress.com/81/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/techiella.wordpress.com/81/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/techiella.wordpress.com/81/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/techiella.wordpress.com/81/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/techiella.wordpress.com/81/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/techiella.wordpress.com/81/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/techiella.wordpress.com/81/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/techiella.wordpress.com/81/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/techiella.wordpress.com/81/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=techiella.wordpress.com&amp;blog=4061067&amp;post=81&amp;subd=techiella&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://techiella.wordpress.com/2009/01/26/discount-yield-to-money-market-yield-conversion/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d28b68287e6d139d41b12b760b7a32fe?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">techiella</media:title>
		</media:content>
	</item>
	</channel>
</rss>
