2010 Aug 21 - Sat
The Once Very Valuable ARMS indicator
In 1989, Richard W. ARms, Jr. wrote a book called The ARMS Index (TRIN).
In a nutshell, it makes use of various ratios of number of advancing and the number of
declining issues. In some cases, it can (or could) be used as a leading indicator of
equity market activity.
Oakshire Investment Research's Bourbon and Bayonets newsletter suggested that
this may now need to be take with a grain of salt:
It could well be that the 'Hindenberg Omen' is a helpful indicator for those who compute it on a regular basis, but for our part, there are problems associated with it that make it vulnerable to an excessive number of false positives.
It's the same issue, in fact, that plagues the once very valuable ARMS indicator, and some of the McLellan indicators, both of which are reliant on a daily reading of advancing and declining issues in the market.
The problem is this: these systems were designed to work by making a computation of all the market's common stocks, but today there are so many securities that are anything but common stocks that are dressed up and packaged as such . and they comprise an ever increasing number of the total issues trading on exchanges today. That includes bond and money market ETFs, Closed End Funds (CEFs), sector ETFs and preferred shares, not to mention all the reverse ETFs and other derivative products masquerading as common stock.
So to maintain some semblance of usefulness, the calculations will need to be refactored:
In short, both high/low numbers and advance/decline figures are not what they used to be. Certainly, for those who are able to strip out the superfluous aspects and compute the indicators on the basis of common stocks alone, there's something valuable to be had. Otherwise, we wouldn't trust the data as a stand alone indicator.
[/Trading/TechnicalAnalysis]
permanent link
2010 Aug 18 - Wed
Cygwin, Eclipse and Subversion Installation Notes
I have written several articles about Eclipse (the code editing UI) and it's
integration with subversion. This is an update of a few things to watch out for
with Eclipse, the Helios release. I do development on Linux as well as on Windows. In
this case my primary machine is a Windows machine running VMWare with several
guest Linux systems.
For the Linux systems with a GUI, I've used Cygwin to provide a mechanism of running the
Linux interfaces on my Windows interface. I have tried the VMWare Unity mechanism, but
on my multi-monitor system, it appears clunky and buggy.
When installing Cygwin, the key library to install is the 'xinit' library. This loads
all other necessary X11 libraries. Also include mintty in the Shells category for an
improved console experience.
As a side note for regular terminal operations in Cygwin, the following can be used with
mintty. Start 'ssh-agent mintty'.
mintty is explained at
http://code.google.com/p/mintty/.
Then use ssh-add to add a private key. The public key can be added to the ~/.ssh/authorized_key
files on the destination machines.
Anyway, for getting the GUI experience, use startxwin to start an xwindow terminal window.
Connect to the destination computer with 'ssh -l username -Y ipaddress'. At that point,
I run eclipse with '/usr/sbin/eclip[se/eclipse &'. The '&' forks the process and allows further
operations in the terminal window.
I've got ahead of myself here. To get eclipse installed, I downloaded the binaries from
eclipse.org, expanded them to a directory called eclipse. I then moved the directory to
/usr/sbin. Eclipse can then be started with '/usr/sbin/eclipse/eclipse'.
For version control, the Polaris subversion client is listed as a standard item
in the Collaboration items in the Eclipse New Software. After trying that, I wasn't very
pleased with the experience. It is not well integrated.
Instead, I removed the Polaris Subversive client and installed the Tigris.org
Subclipose Client.
The integration into Eclipse is much better. I used the SVNKit (Pure Java) connector
so as to obtain the svn+ssh://... tunnelling capability with a private key based login.
[/OpenSource/Programming]
permanent link
2010 Jul 18 - Sun
Gold Manipulation, Deficits, Money Theory
Gold Manipulation
I've been accumulating a number of open browser windows, and need to get them closed.
The only way I can close them is to write about them. So here is a mish mash of things
I've collected.
The first collection looks at gold price manipulation. Many commentaters are saying
that gold is a safe investment for protection against today's faltering fiat money systems.
They are also saying that gold could reach highs of $1500, $2000, or even $7000.
Various conspiracy theories are indicating that JP MOrgan is acting on Government orders to
keep the price of Gold and Silver down. This could be one indication of why the price of
gold has been trading sideways for the last fews months in direct defiance of all the
money being thrown gold's way through direct investment, futures, and ETFs.
ZeroHedge has a
lateral reference to market manipulation via an article on the current Coco futures market sqeeze.
To profit from the market's manipulation of the gold market, some people have put together intraday average price
charts which show some interesting entry and exit times.
In any case, it could be said that the bullion banks are
manipulating the market technicals
in order to obtain a market correction for getting rid of their disportionate
shorts in the futures markets. The Market
Oracle thinks
that gold is going down, lots due to
a broken wedge formation.
If gold is indeed going down, bullion bank's shorts could be cleared, and this could represent a buying opportunity
for gold. It is unclear how far the correction could go. But in any case, most places I read indicate that getting
into gold is a good thing. And to keep it for a while. Possibly a long while, as described by
Dylan Grice Discusses When To Take Profits On Gold: Hint - Not For A Long While.
Even while gold is undergoing some weakness, the
Wall St. Cheat Sheet
figures that it has considerable upwards strength. Once the manipulation is taken away, the price of gold could quickly get out of hand.
Market Leading Indicator
ETF Daily News offers a possible leading indicator:
Watch The 20+ Yr Treasury Bond ETF For Clues To Likely Stock Reversals? (TLT, SPY, IEF).
Hauser's Law
The government, any government, has an insatiable hunger for more and more money. On the US side of things,
there is talk of instituting a value added tax (VAT). Will it do any good?
According to an article written by David Ranson called
The Revenue Limits of Tax and Spend,
there appears to be a limit to how much tax a government can collect through it's various mechanisms.
Hauser's Law indicates that Federal tax receipts will always fall short of 20% of GDP. So...
if the government ever became efficient, they would use the opportunity to close out other departments where
taxes collected decrease.
The Canadian Government instituted their GST, which is a form of production pipeline tax. Both the
GST and VAT could be seen as a form of consumption tax. If you don't consume anything, you don't pay taxes. I
suppose that could be seen as the best of a bad situation.
Spending
As governments spend and spend like there is no tomorrow, they create larger and larger deficits. Deficits
can be covered by printing more and more money. Because there is no physical basis on which money resides,
it is called a fiat money. That is, governments can simply pay for things with money
it prints electronically out of thing air. Because gold
is a physical quantity, and can be traded, it's value should rise with the inflation of fiat money. But the
markets are appearing to be manipulated. Big Money is holding things back. By inflating away the value of fiat
money, governments have a slim chance of making good on the money they've spent. But with today's economy
as slow as it is, some are warning we could go into a deflationary phase. Governments don't like that, as
it makes it hard to cover their debts.
On the US side of things, it is said that
The American Dream Is Quickly Becoming The American Nightmare. It is hard to cut back
when so many expect so much for so little.
Keynesians would like to spend more and more to get out of the economic malaize currently existing. But that
just doesn't make sense anymore. The tipping point has probably been reached. It would appear that
even if there were to be a recovery, the recovery wouldn't be substantial enough to pay back even a small
percentage of what is owed.
The blog Credit Writedowns has an article which provides some insight into
Misunderstanding Modern Monetary Theory.
For a background on hyperinflation, Dylan Grice writes on
Popular Delusions, Some useful things I've learned about Germany's hyperinflation.
[/Trading/MarketNotes]
permanent link
2010 Jun 27 - Sun
The Reformed Broker
Joshua Brown, writes as the
The Reformed Broker. He has a number
of interesting entries:
- The Periodic Table of Finance Bloggers, which is a list
of blogs defined by categories such as Rocket Science, Rogues Gallery,
The Establishment, Stock Operators, Peanut Gallery, and Baby Buffets.
Econ Gangs of New York: "The factions that are shaping the economic dialog these days are becoming every bit as colorful and distinct as the proto-gangs that once ruled New York's notorious Five Points area. Their leaders, every bit as bellicose and recognizable."
[/Trading/BlogsIFound]
permanent link
2010 Jun 12 - Sat
Real Time Black Holing (RTBH)
Here are some notes to self regarding real time blackholing configurations for dropping / analyzing
packets that 'do not belong'.
From the c-nsp list, RTBH commonly used next hops are RFC based Test Networks:
- IPv4 RFC3330 192.0.2.0/24
- IPv6 RFC5156 2001:db8::/32
[/Networks]
permanent link
2010 May 27 - Thu
Oil Farming
It is only on rare occasions where one can obtain an elegant solution having positive ramifications for
two differing economic sectors simultaneously.
These two guys are offering up an eco-friendly solution for
squeezing oil out of water.
[/Personal/Business]
permanent link
Naked Market Orders and the Market Meltdown
At Security Industry News, Tom Steinert-Threlkeld
suggests that naked market orders helped escalate the 'flash crash' and subsequent recovery on May 6. I gather the
market-makers, who provide liquidity through limit orders couldn't handle the deluge. And I think that we still don't know
what the hair trigger was that set off the deluge of sell orders.
I learned a new lesson today. The best way of submitting market orders, in order to get the trade, is to use limit orders to create
'collars' around the price of a stock to reduce risks in trades. To go along with this, use algorithms that expressly include risk controls.
Speculation is that the naked market orders were used by the less experienced: some smaller high-frequency traders and some semi-
professional traders.
[/Trading/AutomatedTrading]
permanent link
2010 May 26 - Wed
Germany / Russia Working Together
I wanted to record this little snippet for something to check back on during some point in the
future.
One writer is indicating that Germany is the real economic power in the European Union. Should the
European Union break apart or evolve/devolve into something else, Germany can't go it alone. I have to
take that assertion with a certain grain of salt, but perhaps the next idea fits in.
It is said that Germany's strength is it's manufacturing and export ability. Germany also has a
decreasing population. A logical partner might be France, but they are typically highly competitive
with each other, rather than cooperative with each other.
On the other hand, Russia has a large population with nothing much to do. Rather than being an
exporter of raw materials, Germany could partner with Russia for manufacturing. Rather than
increasing immigration towards Germany, which is something Germany does not want, they would
send manufacturing to Russia.
In summary, it would be of interest to see how the European Union reorganizes around a
possible Germany - Russion alliance.
[/Personal/History]
permanent link
Value Investing
When it comes time start living off dividends, it will be good to have some good value equities in the
portfolio. These equities generate good dividends year and year out.
Good candidates for these types of equities are companies which are what one writer calls
'World Dominators'. These are companies which dominate their industries globally, each is
Number One in its industry. They earn consistent high returns on their capital, and generate
excellent cash flows year after year, through thick and thin. It is said there is one company which
has raised its dividend every year for 54 years, another every year for 36 years.
With the market reaching a low, it might be good to pick up some of these companies. Some
are indicated to be trading at less than 10 times free cash flow.
I think I'll generate a query through my DTN IQ live feed and look at the dividend fields and income fields
to see what I can see.
As one example, one writer is suggesting NLY as a buy. It's chart may be reaching a bottom. I don't know if
it satisfy the other criteria mentioned above, but I'm recording for posterity. It's close today is $16.40.
[/Trading/TradingIdeas]
permanent link
2010 May 25 - Tue
C++ Curiously Recurring Template Pattern
Through the years of maturing in software development, I have migrated through a
series of technologies to solve various programming problems.
During the initial stages of my C++ usage, I used the tried and true run-time dynamic
polymorphism, mostly known as virtual methods through class inheritance. To answer the question of
when to use virtual destructors, Herb Sutter has an excellent article called
Virtuality.
For more virtual destructor information, Item 33 in Scott Meyer's More Effective C++ is helpful.
Inheritance - virtual Functions FAQ has more useful information.
Class inheritance and virtual functions closely couple classes. I wanted start some
decoupling, and do some event based coupling through C#-like events/delegates.
C++ doesn't have a similar concept built-in, but there are various libraries available
while supply a similar concept: Boost's slot/signal system, or the one I ended up using:
FastDelegates.
FastDelegates are supposed to be fast. And they do work well.
As I do some work on the Windows platform, I had been using the MFC classes for some GUI work.
As I got more into multi-threaded designs, MFC started to show it's significant short-comings
related to modular and mult-threaded designs. I came across the Windows Template Library (WTL)
as a nice, fast, light-weight windowing library.
The WTL introduced to me the concept of the Curiously Recurring Template Pattern (CRTP). WTL and
ATL make significant use of the CRTP pattern. A good introduction can be found at Wikipedia's entry for
Curiously Recurring Template Pattern.
CRTP has brought me back tight-coupling of classes, but as a consequence, it offers up the ability to
integrate a number of concepts together: slot/signals aka delegates, maintenance of strong typing,
simulated dynamic binding aka static polymorphism, and fast execution.
The close-at-hand references don't mention one other refinement (I wish I could find the
original source of this trick), and that is one of conditional static polymorphism. There is a way
to conditionally make the polymorphism call: if the derived class doesn't over-ride a method,
the calling code doesn't get compiled, it gets optimized away.
For example:
template <typename T>
class base {
void implementation( void ) {};
void interface( void ) {
if ( &base<T>::implementation != &T::implementation ) {
static_cast<T*>( this )->implementation();
}
}
};
class derived1: public base<derived> {
};
class derived2: public base<derived> {
void implementation( void ) {};
};
In this example of the CRTP, the base class has a default implementation of the interface.
In class derived1, as there is no implementation defined, no implementation gets called. In
class derived2, where there is an implementation defined, it is called.
[/Personal/SoftwareDevelopment]
permanent link
2010 Apr 23 - Fri
Common Representation of IPv6 Address Text Representation
Most everyone knows how to write an IPv4 ip address, and is easy and simple to understand.
As the world migrates to a new internet addressing system, which is known as IPv6, writing
out the address becomes difficult. The difficulty is that there are multiple ways of
writing an IPv6 address. As a consequence, when people need to perform text searches,
no matches may result because the way in which it was searched doesn't match the way in
which it was written.
A new document has been authored entitled
A Recommendation for IPv6 Address Text Representation which helps to standardize the process of writing
an IPv6 address.
In a nutshell, the recommendation is:
- Leading zeros MUST be suppressed. For example 2001:0db8::0001 is not
acceptable and must be represented as 2001:db8::1. A single 16 bit
0000 field MUST be represented as 0.
- The use of symbol "::" MUST be used to its maximum capability. For
example, 2001:db8::0:1 is not acceptable, because the symbol "::"
could have been used to produce a shorter representation 2001:db8::1.
- The symbol "::" MUST NOT be used to shorten just one 16 bit 0 field.
For example, the representation 2001:db8:0:1:1:1:1:1 is correct, but
2001:db8::1:1:1:1:1 is not correct.
- When there is an alternative choice in the placement of a "::", the
longest run of consecutive 16 bit 0 fields MUST be shortened (i.e.
the sequence with three consecutive zero fields is shortened in 2001:
0:0:1:0:0:0:1). When the length of the consecutive 16 bit 0 fields
are equal (i.e. 2001:db8:0:0:1:0:0:1), the first sequence of zero
bits MUST be shortened. For example 2001:db8::1:0:0:1 is correct
representation.
- The characters "a", "b", "c", "d", "e", "f" in an IPv6 address MUST
be represented in lower case.
- When writing port numbers with an IPv6 address, the [] style as expressed in [RFC3986] SHOULD be employed, and is the
default unless otherwise specified -- [2001:db8::1]:80
[/Personal/Technology]
permanent link
Borrowing Money to make Money, Taxpayer Pays the Interest
Eric Fry, in teh Daily Reckoning, provides an interesting insight into the profitability of today's banking sector:
When it converted into a bank holding company back in 2008, Goldman became eligible to borrow
cheap money from the Fed's discount window. Morgan Stanley did the same thing. As a result, Goldman,
Morgan Stanley et al. may borrow billions of dollars from the Federal Reserve and use the
proceeds to purchase higher-yielding government securities of longer duration.
In other words, Goldman may borrow from the government at 0.75%, then loan the money back to the
government at 3% or 4%. All in a day's "trading." Not surprisingly, all the major financial
firms have been reporting blockbuster profits. Yesterday, for example, Morgan Stanley
wowed the Street by nearly doubling its expected earnings result. Bond trading provided most of t
he juice, as Morgan's fixed-income revenue more than doubled from the prior year's first quarter.
Prior to Morgan Stanley's results, Bank of America, JP Morgan Chase and, yes, Goldman Sachs, h
ad all reported record quarterly revenue from fixed-income trading. On the surface,
these monster profits would seem like good news. But this silver cloud contains a very dark
lining: without the Fed's low-cost financing, fixed-income profits will be much harder to come by.
[/Personal/Business]
permanent link
World Events and the Iceland Volcano
Byron King at Whiskey and Gunpowder wrote about how natural relate to human events through
history. Any history buffs able to confirm the following?
We need to keep an eye on Iceland and its grumpy volcanoes. The historic record is
filled with Icelandic volcano blasts that wrecked European civilization. It goes back at
least to the days of the Roman Empire. There's evidence that an Icelandic eruption in A.D. 405
led to a harsh winter the next year, in which the Rhine River froze. This allowed the
barbarians cross in numbers sufficient to defeat the Roman Legions.
In A.D. 934, there was a massive lava flow from Iceland's Eldgja fissure system.
It unleashed the largest basalt flood in recorded history. An ash cloud blanketed
Northern Europe and weakened many political structures. This eruption helped keep
the Dark Ages dark, and in particular harmed the English political system. It's
no coincidence that William, Duke of Normandy, conquered England a century or so later, in 1066.
Then there was the Laki eruption in 1783, with another immense outpouring of lava in Ice
land. This eruption emitted large volumes of poisonous gas, including fluoride and
sulfur dioxide chemicals that poisoned half of Iceland's livestock. The gas cloud blew
over Scandinavia as well, causing many deaths and hardships that included a long famine.
There were many deaths further south in Western Europe, as well, in 1783. Then came
several years of extreme weather. Among other problems was a shortfall in farm output.
This led to a drop in tax receipts for governments across the continent. In France,
King Louis XVI eventually had to summon the Estates General to ask for new taxes.
Instead, he wound up with the French Revolution.
The San Francisco earthquake of 1906, for example, caused many banks and insurance
companies in the U.S. and Britain to fail. This led to the Panic of 1907. The Panic of
1907 led directly to the creation of the U.S. Federal Reserve in 1913.
He goes on to provide some modern day statistics regarding the volcano:
According to Eurocontrol, which operates the airspace in Europe, about 20,000 flights
per day are canceled. By my back-of-the envelope calculation, that translates into about
1.5 million barrels of jet fuel per day that's not being burned to power airliners. That's
just shy of 2% of total daily world oil demand. So with this fast hit to demand, it's
no wonder that the price of oil has dropped about $4 per barrel in the past week.
Meanwhile world trade is indeed suffering. Perishable items, from flowers to exotic fish
and fruits, are rotting on the loading docks. High-value items like computer chips and
diamonds are sitting in secure warehouses. Much other airfreight is just stacking up on the
pallets. FedEx and UPS together carry about $1.3 billion of goods per day between
North America and Europe. Right now, it's almost all shut down.
The ripples are global. For example, Chinese auto assembly lines are slowing down
due to lack of electronic components from Germany. There are reports of mass layoffs in
nations as far apart as Kenya and Colombia, due to the inability to export goods via
airfreight to Europe. Then consider all the personal and business disruptions and
expenses from casual and business travelers unable to fly.
[/Personal/History]
permanent link
2010 Apr 03 - Sat
Market Notes - 2010/04/02
Cumberland Advisors Market Commentary indicates that there have been
8.4 million American jobs lost due to the recession, and that it may take
upwards of four years to recover those jobs. That would be a recovery
of about 175,000 jobs per month, every month.
The Federal Open Market Committee (FOMC)
says that unemployment is going to stay at 9.5 to 9.7 percent for 2010. It may decrease
by the end of 2011 to 8 percent and to around 7 percent at the end of 2012. This would
tend to indicate that the majority of job recovery will not happen till 2013 at least.
Cumberland suggests that the Fed will be balancing job creation with inflation:
... there is a tradeoff between employment and prices, with inflation increasing
when unemployment reaches a critical low rate. The Fed's job is to strike a
balance so that sustainable economic growth that maintains full
employment doesn't trigger an outbreak in inflation.
The Fed strikes this balance through something called the Phillips Curve Framework:
... as unemployment declines, labor markets become tight,
employers bid up wages, capacity utilization decreases,
and to maintain profits companies increase prices ... With the current substantial
slack in the economy, a stagnant housing market with prices still not
completely stabilized, few signs of impending inflation, and a continuing
problem in the commercial real estate market, the FOMC can focus on
jobs and keep interest rates low to support growth in the real
economy as it gradually recovers.
Cumberland figures that
the continued weakness in the job market, no impending signs of inflation, and a fall election will keep policy interest rates at approximately their same level through this year.
This week's job report indicated payrolls rose by 162,000 jobs, which includes 48,000
temporary census workers. This could be a sign of recovery. Others say it is a recovery
from February snow storm effects. However, previous months results have also been
revised upwards, so it may not be so bad.
Chart of the Day indicates a
couple of things: job losses were more significant on this recession, and that job losses
have probably bottomed out.
However, in a recent Gallup pOll finds that 20.3% of the US Workforce was underemployed in March. Gallup concludes with:
As unemployed Americans find part-time, temporary, and seasonal work, the official unemployment rate could decline. However, this does not necessarily mean more Americans are working at their desired capacity. It will continue to be important to track underemployment -- to shed light on the true state of the U.S. workforce.
Back in Nov 2, 2008, I reprinted an article regarding
Why the Mortgage Crisis Happened. In Wednesday's Casey's Daily Dispatch,
I read about the US Government's next big bit of legislation
would give the government unprecedented powers to split up firms considered too risky, and thus a threat to the economy, as well as put together a council of regulators to watch for risks in the financial system and create an independent consumer protection agency.
In Dodd's own words, the critical pieces of his proposal include:
- It will end bailouts, ensuring that failing firms can be shut down without relying on taxpayer bailouts or threatening the stability of our economy.
- It will create an advance warning system in the economy, so that there is always someone responsible looking out for the next big problem.
- It will ensure that all financial practices are exposed to the sunlight of transparency, so the exotic instruments like hedge funds and derivatives don.t lurk in the shadows and businesses can compete on a level playing field.
- It will protect consumers from unsafe financial products, such as the subprime mortgages that led to the financial crisis.
It seems to me that if the government undid all the stuff they've implemented since 1933, we wouldn't
be in this mess, and wouldn't need these fixes. The second item above is particularily ironic,
what with one hand of the government creating the mess, and the other hand of the government
attempting to police the action.
Casey's Report goes onto to say it much better than I:
I do take issue with creating yet another bureaucracy tasked with 'consumer protection'. It's my understanding that prior to the financial crisis no fewer than seven regulatory agencies were tasked with the exact kind of 'consumer protection' proposed by Dodd's new bill. And they didn't do a darn thing to help.
Other evidence of government's incapability of policing markets comes to light with a
whistle blower's report of
Gold Market Manipulation.
It is said that the market manipulation was to:
The objective of this manipulation is to conceal the mismanagement of the U.S. dollar so that it might retain its function as the world's reserve currency. But to suppress the price of gold is to disable the barometer of the international financial system so that all markets may be more easily manipulated. This manipulation has been a primary cause of the catastrophic excesses in the markets that now threaten the whole world.
Additionally:
... the CFTC hearing revealed that there is 100-times more paper-gold outstanding than physical gold ... if we get a squeeze on the naked shorts, the sky is the limit for precious metal prices...
Over the past ten years, the gold cartel has staged a controlled retreat. It has been fighting the advancing gold price with propaganda, paper short sales and the occasional dishoarding of physical metal from central bank vaults and more recently, the IMF. This retreat is I suspect about to turn into a rout, which means the upside potential for the precious metals is huge.
[/Trading/MarketNotes]
permanent link
Welcome to Planet NIT WIT
NIT WITs (Nationalize, Inflate, and Tax . Whatever It Takes) in Washington
Taken from a Casey Daily Dispatch:
Key among the tools used by governments around the globe to fund their steady expansion are the rights they take unto themselves to Nationalize, Tax, and Inflate, or NIT for short.
And they don't stop there. If a problem arises that threatens the status quo in any way, governments these days are quick to do "Whatever It Takes" (WIT). And we.re not just talking about snuffing out Arab bogeymen in Dubai hotels or handing over $180 billion to failing insurance companies - these days, if a problem is considered serious enough, no obvious limits need apply.
[/Personal/TagLines]
permanent link
2010 Apr 02 - Fri
Checked Iterators in Microsoft Visual C++
I've wondered why some of my C++ programs seem to run slower than I think they should be
running. Then I came across an article regarding Checked Iterators, and it become clearer
to me where some of my execution speed issues could be. By default, in debug mode,
all standard iterators are bounds checked. This checking can cause a slow down in
execution speed when using standard iterators extensively.
The solution is to set certain macros to selectively enable and disable the checking
on proven code. A
Microsoft MSDN article on Checked Iterators
describes the two symbols used for controlling the checked iterators feature:
- _SECURE_SCL: If defined as 1, unsafe iterator use causes a runtime error. If defined as 0, checked iterators are disabled. The exact behavior of the runtime error depends on the value of _SECURE_SCL_THROWS. The default value for _SECURE_SCL is 1, meaning checked iterators are enabled by default.
- _SECURE_SCL_THROWS: If defined as 1, an out of range iterator use causes an exception at runtime. If defined as 0, the program is terminated by calling invalid_parameter. The default value for _SECURE_SCL_THROWS is 0, meaning the program will be terminated by default. Requires _SECURE_SCL to also be defined.
[/Personal/SoftwareDevelopment/CPP]
permanent link
2010 Mar 29 - Mon
Market Notes
Dow Theorists have seen one of their key market indicators become positive over the last couple of weeks.
During the end of March, the Dow Jones Industrials Average closed above its previous closing bull market high of 10,725.
The Dow Jones Transportation Average has also closed above it's previous January high. This, according to the theorists,
is an indicator of an ongoing bull market. Recent daily volumes have been below average of the last 12 months, so it
is not necessarily a strong bull market.
But then again, with so many people out of work (10% who are seeking, but 17% when added in the non-seekers), there
is probably less money to be put in to the markets, and thus fewer shares traded.
The new Dow levels also represent a 50% retracement level of the recent bear market. This, too, would indicate a
Bull market.
With a struggling stock market and decreasing house prices it is hard to determine where to put one's money for
best appreciation. Even the price of gold is declining. But according to
Zero Hedge, it could be total manipulation.
The article mentions that the amount implicitly meant to be delivery is 100 times the physical amount that can be delivered. If you have an unallocated account, change it to physical really really soon. If people start demanding delivery, prices will then start to reflect reality.
For the subject of house pricing, Joel Bowman at The Daily Reckoning, made the following remarks about house pricing:
There's nothing wrong with someone wanting more than they can afford...it's
when they get it that the cracks begin to appear. All over America, banks made loans they
couldn't afford to make to people who couldn't afford to repay them. The solution ... would be to allow the
market enough space to establish real world price discovery. Prices must be permitted to
fall to "affordable" levels, in other words; levels that would inspire some level of market clearing.
Alas, what is good for the economy and what is politically expedient is rarely
one and the same thing. The voting public, by and large, won't tolerate a
"leave alone" government. They want their elected leaders to "do something,"
to step in and relieve them from the financial pains of a generation worth of
overconsumption. In short, they want their government to force someone else - anyone else! - to pick up the tab for them.
I gather that is what the Obama government is doing, redistributing wealth for all its worth, or not worth, considering
how much national debt is being run up. The phrase -- racking up debt like there is no tomorrow -- takes on a whole new meaning. But
then, possibly, so do life experiences affect governing abilities:
The Obamas. Personal Debt vs. Obama's, Demand That Americans Cut Back.
If you view a
chart of the Dow from the 1920's to the present, you see what could be defined as a classic head and shoulders pattern...
a pattern with definite bear feeling to it. But considering the time line, it could happen in the next days or years.
At
Chart of the Day - How does the current rally rank?,
they show that the current Dow Rally has entered the low range of the "typical" rally and would currently be classified as both short
in duration and below average in magnitude.
I guess we'll have to see what the upcoming week's job reports have to say, and what they say after factoring out the
hiring bump due to the employment for termporary census workers.
With the heavy debt which the US government is taking on, it is beginning to resemble the affairs of Greece. There are some
writers who are saying the end of the US Empire is near. They draw comparisons with the Roman Empire during its rise and fall.
Empires on the Edge of Chaos by
Niall Ferguson is an interesting take on the situation. He references a series of paintings entitled
The Course of Empire by Thomas Cole.
"It is notable in part for reflecting popular American sentiments of the times".
There is an interesting chart at
Nathan's Economic Edge,
which represents debt saturation. With all the new US Debt, the chart shows that the debt is no longer serviceable. So...
I guess we enjoy the bull market while we can, and start to buy puts or go short to catch the ultimate market downturn. Which might
start to happen in the few coming months as commercial real estate loan renewals and the ARMS resets start to occur.
In the upcoming week we have:
- Monday: Personal Income and Outlays report for February
- Tuesday: Case-Shiller House Price Index (are house prices still declining?)
- Wednesday: ADP March Employment Report (not distorted by the Census hiring), Chicago PMI Index, Census Bureau February Factory Orders
- Thursday: Initial Weekly Unemployment Claims, ISM Manufacturing Index, Census Report on Construction Spending, Personal Bankruptcy Filings for March
- Friday: BLS March Employment Report (distorted by Feb snow storms and Census hiring)
The Census Bureau has recently reported that new home sales is still on the decline.
The Architecture Billing Index is a leading indicator for Commercial Real Estate (CRE) investment, and is still quite low.
Historically, according to the AIA, there is an "approximate nine to twelve month lag time between architecture billings and construction spending" on non-residential construction. This suggests further significant declines in CRE investment through all of 2010, and probably longer.
According to
Todd Harrison at MarketWatch,
savvy investors continue to monitor corporate credit as a timing mechanism for an equity downturn. In the same article, he makes mention of
"10 reasons why we're witnessing a cyclical bull market in the context of a prolonged and painful secular bear stretch. "
One of his indicators is the VIX (Volatility Index), which is at a comparative low. VIX is cyclical, sometimes it is a large value and sometimes it is a small value. with it
being currently small, it means it could smaller, but at some point, it is going to get bigger. When it gets bigger, the market
will be moving in one of two directions, up or down. Because it is already going up, albeit slowly and with great difficulty, we will most
likely find some really bad news, and the market will drop again, quickly. Dropping quickly, or going up faster, means the VIX will expand,
and is therefore a slightly trailing indicator. Be ready with shorts and puts when the VIX expands with a dropping market.
The market volatility could change in a big way or in a small way. It is hard to tell. John Mauldin, in one of his
newsletters has this to say on Ubiquity, Complexity Theory, and Sandpiles:
Well, in 1987 three physicists, named Per Bak, Chao Tang, and Kurt Weisenfeld, began to play the sandpile game in their lab at Brookhaven National Laboratory in New York. Now, actually piling up one grain of sand at a time is a slow process, so they wrote a computer program to do it. Not as much fun, but a whole lot faster. Not that they really cared about sandpiles. They were more interested in what are called nonequilibrium systems.
"To find out why [such unpredictability] should show up in their sandpile game, Bak and colleagues next played a trick with their computer. Imagine peering down on the pile from above, and coloring it in according to its steepness. Where it is relatively flat and stable, color it green; where steep and, in avalanche terms, 'ready to go,' color it red. "
"What do you see? They found that at the outset the pile looked mostly green, but that, as the pile grew, the green became infiltrated with ever more red. With more grains, the scattering of red danger spots grew until a dense skeleton of instability ran through the pile. Here then was a clue to its peculiar behavior: a grain falling on a red spot can, by domino-like action, cause sliding at other nearby red spots. If the red network was sparse, and all trouble spots were well isolated one from the other, then a single grain could have only limited repercussions. "
"But when the red spots come to riddle the pile, the consequences of the next grain become fiendishly unpredictable. It might trigger only a few tumblings, or it might instead set off a cataclysmic chain reaction involving millions. The sandpile seemed to have configured itself into a hypersensitive and peculiarly unstable condition in which the next falling grain could trigger a response of any size whatsoever."
Something only a math nerd could love? Scientists refer to this as a critical state. The term critical state can mean the point at which water would go to ice or steam, or the moment that critical mass induces a nuclear reaction, etc. It is the point at which something triggers a change in the basic nature or character of the object or group. Thus, (and very casually for all you physicists) we refer to something being in a critical state (or use the term critical mass) when there is the opportunity for significant change.
Buchanan concludes in his opening chapter, "There are many subtleties and twists in the story ... but the basic message, roughly speaking, is simple: The peculiar and exceptionally unstable organization of the critical state does indeed seem to be ubiquitous in our world. "
So what happens in our game? "... after the pile evolves into a critical state, many grains rest just on the verge of tumbling, and these grains link up into .fingers of instability' of all possible lengths. While many are short, others slice through the pile from one end to the other. So the chain reaction triggered by a single grain might lead to an avalanche of any size whatsoever, depending on whether that grain fell on a short, intermediate or long finger of instability."
"In this simplified setting of the sandpile, the power law also points to something else: the surprising conclusion that even the greatest of events have no special or exceptional causes. After all, every avalanche large or small starts out the same way, when a single grain falls and makes the pile just slightly too steep at one point. What makes one avalanche much larger than another has nothing to do with its original cause, and nothing to do with some special situation in the pile just before it starts. Rather, it has to do with the perpetually unstable organization of the critical state, which makes it always possible for the next grain to trigger an avalanche of any size."
Relating this to our sandpile, the longer that a critical state builds up in an economy or, in other words, the more fingers of instability that are allowed to develop connections to other fingers of instability, the greater the potential for a serious "avalanche."
It's all connected. We built a very unstable sandpile and it came crashing down and now we have to dig out from the problem. And the problem was too much debt. It will take years, as banks write off home loans and commercial real estate and more, and we get down to a more reasonable level of debt as a country and as a world.
[/Trading/MarketNotes]
permanent link
2010 Mar 28 - Sun
A Collection of Quotes
Seduction is part of my stock in trade in the diplomatic service. Public lies are shouted in councils and courts, but secret truths are whispered in beds. -- The Miocene Arrow
"Everything will be okay in the end. If it's not okay, it's not the end. -- an email footer
"You see, wire telegraph is a kind of a very, very long cat. You pull his tail in New York and his head is meowing in Los Angeles. Do you understand this? And radio operates exactly the same way: you send signals here, they receive them there. The only difference is that there is no cat." -- Albert Einstein
<< One of the really cool things about the camera is its cooling system. >> -- One would hope so. -- email foot from Dan Drasin
Holmes opined "It is a capital mistake to theorize before one has data. Insensibly one begins to twist facts to suit theories, instead of theories to suit facts".
"Undecidable by reduction to the halting problem in general, though apparently possible for straight-line code (no loops/recursion) through the brute-force method of generate all paths and send them to a theorem prover to prove equivalence." -- email foot from Scott McMurray
"The American dream is not owning a house; it.s every individual having the opportunity to achieve their full, God-given ability, and each generation having the responsibility to leave the country better off and better-positioned than the next so that our children and grandchildren can have a better way of life than we have" -- former U.S. Comptroller General David Walker
"It's is not, it isn't ain't, and it's it's, not its, if you mean it
is. If you don't, it's its. Then too, it's hers. It isn't her's. It isn't our's either. It's ours, and likewise yours and theirs." -- Oxford University Press, Edpress News
"If you don't do it right the first time, you'll just have to do it again." -- Jack T. Hankins,
"The more sophisticated the technology, the more vulnerable it is to primitive attack. People often overlook the obvious." -- Dr. Who,
"Everything should be as simple as possible, and no simpler" -- Einstein
"Common sense is not so common" -- Voltaire
"Stability leads to instability. The more stable things become and the longer things are stable, the more unstable they will be when the crisis hits." -- Hyman Minsky
"Never appeal to a man's 'better nature,' he may not have one. Invoking his self-interest gives you more leverage."
"Unfortunately, inefficiency scales really well." -- Kevin Lawton
"Davenport answered with a lift of his own glass, sniffed, then sipped. Tantalizingly delicious, deliciously tantalizing. He saw that it could be dangerous--a taste too easily acquired for something not so easily acquired." -- Foundations Friends.
"Let me state the obvious and posit the known--nothing is so overlooked as the obvious and nothing is so mysterious as the known" -- Foundations Friends
"It is what you do in life, not what torments you in your soul, that matters. And who you are in life, not who you fear you might become." Bast to Herzer in There Will Be Dragons
[/Personal/TagLines]
permanent link
2010 Mar 18 - Thu
2009 Christmas Panto, 2010 Dad's Army
I havn't been writing much in the last while. I should have been. The least I could have done
is keep a diary of what I've been doing. Coulda, shoulda, woulda.
My excuse has been that I've spent quite a bit of time doing two things: designing, tuning, and running lighting for
two recent shows at Bermuda Musical and Dramatic Society (BMDS), and then when not lighting, doing videos of the shows.
November and December were taken up with designing the lighting for BMDS' annual Panto at City Hall. This
year we had a visiting director put on his work called Robin Hood.
For January and February, we had a local-up and-coming director put on a terrific production of Dad's Army.
Dad's Army was a regular series on BBC TV,
and was popular with the local crowd. We really didn't need to do any advertising, the show sold itself. After
pre-sale tickets to patrons, cast and crew, there were only 9% of the tickets remaining for the general public.
I'm not sure if this is a first for the theatre, but we ended up running an extra three nights. Tickets for those
nights were sold out within 90 minutes.
I ended up shooting some video over several nights of Dad's Army as a keep sake with my new Panasonic HVX-200A. With that
footage, plus a bunch of pre-production footage, I have a bunch of editing to do. Lots of editing.
Our next show is called 'A String of Pearls', with lighting design by one of my mentors. I get to take some time
off and catch up on stuff I havn't been doing. Hopefully the updates here will now be more frequent as I catch
up on my reading and projects.
I need to take a break when I can as I've been requested to design lights for this year's Panto. The script has been
written by the local actress, writer, director Carol Birch. It is loosely based upon the story of Firebird and promises to
be challenging from a lighting perspective... I guess me complaining that lighting for recent shows has been too
easy, so she going to let me try out some new concepts. Our lighting inventory has been expanded with additional
colour changers and moving fixtures, so we should be able to try out a more technically oriented show.
[/Personal/Lighting]
permanent link
2010 Jan 29 - Fri
Migrating Bacula 2.x on Debian Etch to 3.x on Squeeze
Debian Etch, which is the current release, has the Bacula 2.x packages.
I needed to upgrade to the Bacula 3.x packages, which are located in debian/testing,
also known as the forthcoming Debian Squeeze release. In addition, since PostgreSQL 8.3 is
packaged in Etch, and PostgreSQL 8.4 is packaged in Squeeze/testing, a database
migration is also required.
I had attempted updating my sources.list file to testing and then running the
apt-get dist-upgrade process. This broke some dependences, and also broke on a
udev migration. I guess testing has more testing to do on the distribution
upgrade process.
In the end, I built a new Bacula service on a freshly installed Debian testing server.
The special consideration for this configuration is that it needs to handle backing
up servers across a WAN. As such, backups may travel through one or more firewalls. Through
such a configuration, it is very difficult to get the firewall ports opened for the various
necessary Bacula service ports. The better way to tackle this is through the use of
ssh' port local and remote port forwarding capability. Port 22 is becomes the only necessary
port to open on a firewall. The ssh-tunnel.sh script helps make this happen.
To build the server, when it came to package selection, I unselected all packages, and then chose
just the database package which installed PostgreSQL.
After the basic server finished installing and rebooted, I manually installed the following packages:
apt-get install bacula-common-pgsql
apt-get install bacula-client
apt-get install bacula-director-common
apt-get install bacula-director-pgsql
apt-get install bacula-sd-pgsql
apt-get install bacula-server
If starting with a new database, then dbconfig-common can be used. If migrating an older database, don't use
dbconfig-common, and use the manual methods I'll describe further on. There is further documentation in
/usr/share/doc/bacula-director-pgsql.
During installation of the bacula packages, a new user of 'bacula' is created, as well as a group called 'tape'.
The 'bacula' user has a home directory of /var/lib/bacula.
Into that directory, create a .ssh directory for any authorized_keys and known_hosts required. I also created a keys
subdirectory to hold the public/private keys for ssh'ing into other servers for processing backups. I called the
two files 'bacula' and 'bacula.pub'. These will be referenced in my customized ssh-tunnel.sh script.
Run
dpkg-reconfigure exim4-config
to reconfigure the mail system to allow outbound mail delivery.
My backups go onto a remote file share. I created an entry in /etc/fstab along the lines of:
10.1.1.1:/bu /mnt/nas nfs rw,hard,intr,async,nodev,nosuid 0 0
Ensure that the NFS client is installed through:
apt-get install nfs-common
In /etc/postgresql/8.4/main/pg_hba.conf, I have lines along:
host bacula bacula 127.0.0.1/32 trust
host bacula sysadmin 127.0.0.1/32 trust
local bacula bacula trust
local bacula sysadmin trust
As an aside, a useful command to find out database information is through the use of:
psql -l
When migrating the database to 8.4, there are modifcations to the pg_dump command required (which are
required to prevent import errors along the lines of 'ERROR: invalid byte sequence for encoding "UTF8"',
basically resolving the UTF-8 to SQL_ASCII issues in Bacula):
pg_dump -E SQL_ASCII -U bacula bacula > /var/lib/bacula/bacula.sql
On the new server, use the following to import the database:
dropdb bacula
su - postgres
psql
create role bacula;
create database bacula owner=bacula encoding='SQL_ASCII' template=template0;
/q
psql bacula </var/lib/bacula/bacula.sql
Basic instructions for updating the database from Bacula table version 10 to Bacula
table version 11 is found in /usr/share/bacula-director/update_postgresql_tables:
BEGIN;
ALTER TABLE file ALTER fileid TYPE bigint ;
ALTER TABLE basefiles ALTER fileid TYPE bigint;
ALTER TABLE job ADD COLUMN readbytes bigint default 0;
ALTER TABLE media ADD COLUMN ActionOnPurge smallint default 0;
ALTER TABLE pool ADD COLUMN ActionOnPurge smallint default 0;
-- Create a table like Job for long term statistics
CREATE TABLE JobHisto (LIKE Job);
CREATE INDEX jobhisto_idx ON JobHisto ( starttime );
UPDATE Version SET VersionId=11;
COMMIT;
Once the configuration files for the director, storage manager, and file manager are ready, bacula
can be managed through 'bconsole'.
My modified /etc/bacula/scripts/ssh-tunnel.sh looks like:
#!/bin/sh
# script for creating / stopping a ssh-tunnel to a backupclient
# Stephan Holl sholl@gmx.net
# Modified by Joshua Kugler joshua.kugler@uaf.edu
# Modified by Ray Burkholder ray@oneunified.net
#
#
# variables
USER=bacula
CLIENTADDR=$2
# CLIENTPORT is local end
CLIENTPORT=$3
#LOCAL=your.backup.server.host.name
# local is a local address and uses ssh's remote/local port forwarding
LOCAL=127.0.0.1
SSH=/usr/bin/ssh
SSHOPTIONS=-vfnCN2
LOG1=/var/lib/bacula/log1.log
LOG2=/var/lib/bacula/log2.log
#LOG1=/dev/null
#LOG2=/dev/null
# location of the public/private keys used with ssh to gain access to remote servers
KEY=/etc/bacula/keys/bacula
case "$1" in
start)
# create ssh-tunnel
echo "Starting SSH-tunnel to $CLIENTADDR..."
$SSH $SSHOPTIONS -o PreferredAuthentications=publickey -i $KEY -l $USER \
-R 9101:$LOCAL:9101 -R 9103:$LOCAL:9103 -L $CLIENTPORT:$LOCAL:9102 $CLIENTADDR \
>> $LOG1 2>> $LOG2
exit $?
;;
stop)
# remove tunnel
echo "Stopping SSH-tunnel to $CLIENTADDR..."
# find PID killem
PID=`ps ax | grep "$SSH $SSHOPTIONS -o PreferredAuthentications=publickey -i $KEY" \
| grep "$CLIENTADDR" | awk '{ print $1 }'`
kill $PID
exit $?
;;
*)
# usage:
echo " "
echo " Start SSH-tunnel to client-host"
echo " to bacula-director and storage-daemon"
echo " "
echo " USAGE:"
echo " ssh-tunnel.sh {start|stop} client.fqdn"
echo ""
exit 1
;;
esac
The links I used for getting started with ssh-tunnels are found at:
In /etc/hosts file, 127.0.0.1 should be the only line referring to the local server. The exteral port
ip address should be commented out:
127.0.0.1 localhost bu.example.com bu
#10.10.10.1 bu.example.com bu
In the bacula-dir.conf configuration file, a typical client configuration will look similar to:
Client {
Name = mail-fd
Address = 127.0.0.1
FDPort = 9130 # specific port for this client, allows multiple simultaneous backups
Catalog = MyCatalog
Password = "xxxxxx" # password for FileDaemon
File Retention = 120 days
Job Retention = 4 months
AutoPrune = yes # Prune expired Jobs/Files
}
The special characteristic of the above configuration is the use of a unique port number for FDPort.
Each client in the bacula-dir.conf should have a unique port number. This allows bacula to
tunnel via ssh to remote clients and redirect them to the storage manager on the
local server.
The definition of the storage device in bacula-dir.conf will have Address=127.0.0.1 and SDPort=9103.
The job description for each client should have something similar to:
Job {
Name = "mail-fd"
Client = mail-fd
JobDefs = "DefaultJob"
FileSet = "FileSet_mail"
Storage = storageSshClients
Write Bootstrap = "/var/lib/bacula/mail.bsr"
Priority = 12
Run Before Job = "/etc/bacula/scripts/ssh-tunnel.sh start mail.example.com 9130"
Run After Job = "/etc/bacula/scripts/ssh-tunnel.sh stop mail.example.com 9130"
}
When using Bacula in console mode, a useful command to find out the meaning of the
backup status codes:
*sqlquery
Entering SQL query mode.
Terminate each query with a semicolon.
Terminate query mode with a blank line.
Enter SQL query: select * from status;
+-----------+---------------------------------+
| jobstatus | jobstatuslong |
+-----------+---------------------------------+
| C | Created, not yet running |
| R | Running |
| B | Blocked |
| T | Completed successfully |
| E | Terminated with errors |
| e | Non-fatal error |
| f | Fatal error |
| D | Verify found differences |
| A | Canceled by user |
| F | Waiting for Client |
| S | Waiting for Storage daemon |
| m | Waiting for new media |
| M | Waiting for media mount |
| s | Waiting for storage resource |
| j | Waiting for job resource |
| c | Waiting for client resource |
| d | Waiting on maximum jobs |
| t | Waiting on start time |
| p | Waiting on higher priority jobs |
+-----------+---------------------------------+
Enter SQL query:
End query mode.
For the bacula entry in /etc/passwd, change /bin/false to be /bin/sh.
For each server to which will be connected via ssh, within the
context of the bacula user, use the following command to update ~/.ssh/known_hosts:
ssh -l bacula -i /etc/bacula/keys/bacula -v server.example.com
[/OpenSource/Debian]
permanent link
2010 Jan 17 - Sun
Option Trading Scenarios
Most option trading books discuss the mechanics and mathematics of option trading. Rarely
do they offer up any sort of in-the-trenches useful guidelines for doing what when and how.
Some recent reading has enlightened me on some useful option trading scenarios.
The first one provides the dual mechanism of obtaining income and optionally
paying for protection on an underlying which is already in one's portfolio.
The process involves selling a kind of straddle: selling an out of the money call
and an out of the money put. For example, with TSL, as of Friday's close, is at $49.50.
The Feb 55 Call is at $1.75 and the Feb 48 Put is at $3.25. Selling this results in $5.00 premium.
If TSL stays within the range of $48 and $55 till Feb 19, the full premium is kept. If
the price goes above $55, the underlying will probably be exercised to result in a $5.50 profit,
which is the premium plus the amount the underlying goes to get to the strike price. If
the price goes below $48, the Put will go into the money, most likely causing it to be
exercised, and you'll end up buying the underlying at the Put strike price, which may be a
good thing if you are expecting the price to rebound. On the protection side, the premium
earned on the put and call sale could be use to purchase twice the number of puts at the next
out-of-the money price, which in this case would be Feb 45 Put.
This provides protection on the original underlying plus the
shares gained when the buyer exercised the puts.
Another strategy requires maintenance of no underlying. For a stock that you
think will go up due to some upcoming good news, such as an earnings announcement,
one could sell an out of the money put and use the funds to buy and out of the money call.
By careful selection of put and call strikes, the money gained by selling the put may
fully cover the price of buying the call. The downside of this is if the price of the
underlying goes below the put strike price. You may end up owning the underlying in this case, but
at least it was obtained at a lower price.
[/Trading/Options]
permanent link
They Who Have The Money
Sometime this last week, someone made the observation of the fact that there was a
'hidden buyer' buying a large amount of treasuries during the weekly US Treasury auctions.
There was speculation it might be the Chinese operating through private proxy parties.
The US government has a problem with all the money they are spending. Some one has
to loan it to them. Hence the regular treasury auctions.
A couple figures came to mind. I believe I recall seeing that the Chinese have over
one trillion US dollars due to trade imbalance between the US and China. Another
figure has to do do with the fact that the US government has added over a trillion dollars
to their defict through recent spending.
If you put those two numbers together, and tie them together with the 'hidden buyer'
observation, perhaps it could be said that the Chinese are converting their US dollar
currency holdings into US Treasury holdings. That way, not only have they made money
through their exports, but they make additional revenue through the yields on the
treasuries purchased.
[/Trading/MarketNotes]
permanent link
Short Interest, Solar, Lithium
Many commenters have been discussing Peak Oil, with Peak Oil being the fact that we've found all the easy
supplies of oil, most of which has been pumped, and that our supplies, regardless of type, are dwindling... the
peak has come and gone. To be more specific, the supply of oil, of which we only have a finite supply, is decreasing,
while world demand for oil is increasing. The first day of Economics 100 teaches us the supply / demand curve and the
effect on pricing. Oil prices can only go up, and up until the last dropped is supplied and consumed.
In the meantime, alternate sources of energy must be found to supply the world's unending requirement. For
sourcing some fraction of our energy needs, some are turning to the nearly non-ending supply of sunlight. One
way of converting sunlight into energy is through the utilization of solar panels. Solar panel technology
has improved recently, and has resulted in it becoming economically viable to generate electricity via these sunlight receptors.
A number of companies are in the business of producing solar panels. In a sideways fashion, I came across
TSL (Trinia Solar) yesterday. Someone had run a stock screener with the settings similar to:
- stocks with high put/call ratio
- minimum stock price of $10/share
- minimum put & call open interest of 10k contracts
- minimum average daily stock volume of 100k shares traded
- trading above its 20-day moving average
- near a 52 week high
TSL has risen briskly but has some pessimism from investors based upon puts easily outnumbering calls. If the
negative sentiment unwinds, it could rise further. Another area of measuring pessimism is through
monitoring short interest. The web size
Short Squeeze offers up information so one can see how many shares are sold sort for a
company. Short Interest can also be found within the Fundamental Record of the DTNIQ data stream.
In looking at TSL on Google today, Google shows that all similar solar stocks took a decline today. It turns out that
the German government will cut its solar financial incentive schem by 16 to 17 percent.
With a price correction like this, it might be interesting to look to getting into solar at this level. But the real moral
of the story is that a news service which tracks a portfolio's stock symbols is probably worth its weight in gold.
Moving along with the alternate energy theme, collected energy needs to be stored. Currently technology
appears to be focussing on Lithium as the mineral of choice. A common play appears to be WLC (Western Lithium). An
upcoming player as mentioned in Industrial Metals magazine might be GXY (Galaxy Resources).
[/Trading/MarketNotes]
permanent link
2010 Jan 14 - Thu
Definition of a Banana Republic
In a missive from Contrarian Profits newsletter today, they drew nice intimated
an interesting parallel between a Banana Republic and a certain relatively large,
very well known country. The recipe for a Banana Republic, as described by
Justice Litle, Editorial Director, Taipan Publishing Group.
Wikipedia defines "Banana Republic" as a pejorative term for a country that is
politically unstable, dependent on limited agriculture (e.g. bananas), and
ruled by a small, self-elected, wealthy, and corrupt clique.
Ingredients:
- out-of-control printing presses
- currency restrictions and controls
- strangling regulation and red tape
- aggressive nationalization of private assets
- extravagant social programs (bribing the poor)
- deeply corrupt financial structures (bribing the connected)
- crushing pressures on small business (extorting the middle class)
Directions:
- Combine fervent promises of "hope," "change" and "revolution" in demagogue crockpot. Bring mixture to a slow rolling boil.
- As mixture firms, stir in aggressive spending plans and "revolutionary" public adjustments. Sprinkle liberally with insider connections and oligarchic financial loopholes to maintain smooth consistency. Let simmer for a full election cycle on low-heat propaganda flame.
- Pour filling into flaky self-righteous crust. Top with blatant corruption, repressed scandal and outright nationalization. Bake in fiscal suicide oven until inflation thermometer registers 30%+ and insider cronies are sufficiently enriched.*
*As with a delicate souffle, the middle class must not experience complete collapse during this phase. If this happens, you have inadvertently followed the recipe for a coup.
[/Personal/Business]
permanent link
2010 Jan 12 - Tue
Creating a Cold Standby FreeBSD Machine
I have a FreeBSD machine for which I don't have original installation files, thus
rebuilding the machine and reinstalling software from the ground up on new hardware
could be a problem.
I have a few of avenues getting a suitable secondary machine up and running:
I didn't use the dump/restore commands as I don't have easy access to enough space for temporary
storage so I brute forced the scenario by copying data directly from the source machine partition
to the destination machine partition.
I was able to obtain almost identical hardware for the second machine so as not to have any
hardware compatibility issues. Drive sizes and memory are larger on the second machine.
FreeBSD has a FixIt feature, otherwise known as a live boot, which allows a machine to be booted and
analyzed from a cd. I could have used a recent version of FreeBSD to do this task, but instead,
I chose a version which was of the same major.minor version as that of the running system at the
old release archives.
Once booted off the cd, a number of tasks can be completed:
- create partitions on the disks
- label the partitions
- obtain network connectivity
- copy partitions from source machine to destination machine
- depending upon services started, protect the destination machine from the network
- reboot the destination machine
- log in and verify successful operation
- possibly change driver, service, partition, and network settings
On the source machine, with root privileges, use 'df' and 'df -h' to determine partition
labels and sizes. 'sysinstall' may need to be run to get a listing of all partitions and their sizes,
particularily for the swap partition. The command 'swapctl -l -k -s' will detail the swap device.
On a SCSI based system, drive devices are named in fashion to /dev/da0s1a, where
da0 is drive 0, s1 is slice 1, and a is the first labelled partition. a is typically / (the boot partition),
b is typically swap, c is a hidden device for accessing the full drive, and d and
subsequent drives are partition mappings. On this system I have d as /var,
e as /tmp, and f as /usr.
On the destination computer, I selected the Fixit menu item, then the 'CDROM/DVD' option,
which takes me to a prompt.
I then used 'sysinstall' to gain access to various utilities. The first one I use is FDisk
to allocate all space on the drive to FreeBSD and use 'w' to write the changes to disk.
On exiting, I select the option to 'Install the FreeBSD Boot Manager' onto the drive.
I then use the Label editor to create partitions. They are created in order of a, b, d, e, and f. Note
that c is skipped as part of the process. Write the changes with 'w' and quit.
Then use the Networking menu item, then the Interfaces menu item to set ip addresses for the
interface.
Upon exiting back to the prompt, an 'ipconfig' command should show the ip address as being set.
After confirming network access is available, partitions can be copied over:
- ssh source_ip "cat /dev/da0s1a" | cat > /dev/da0s1a
- ssh source_ip "cat /dev/da0s1b" | cat > /dev/da0s1b
- ssh source_ip "cat /dev/da0s1d" | cat > /dev/da0s1d
- ssh source_ip "cat /dev/da0s1e" | cat > /dev/da0s1e
- ssh source_ip "cat /dev/da0s1f" | cat > /dev/da0s1f
Once things are copied over, disconnect the network interfaces, exit the menus, and
restart the machine. The machine should boot as though it was the original. Watch
the boot messages carefully for any errors.
The utility of the above operation improves if a filesystem snapshot capability is available
incorporated, then a guaranteed 'instant in time' view is available.
[/OpenSource/FreeBSD]
permanent link
|